China once represented Apple’s great hope: a huge, booming market, a growing middle class, a great admiration of the Apple brand.

Instead, as the latest quarterly earnings show, China has turned into one of the company’s biggest headaches. And as time passes, things in China only seem to be getting worse for Apple, despite executives’ protestations to the contrary.

During the earnings call yesterday, CEO Tim Cook tried to sound optimistic about Apple’s prospects in country. “We continue to be very enthusiastic about our opportunity in China,” he said.

The reality for Apple, however, is that native Chinese brands are pulling ahead in the country. Huawei, Oppo, and Xiaomi now have more than 50 percent of the market, according to Canalys. They are sucking up all the oxygen from both Apple and Samsung in the smartphone market.

As such, the numbers for Apple were grim yesterday.

The company posted $10.7 billion in sales in China in the second quarter, down 14 percent from the same period one year ago. This was the fifth straight quarter of year-over-year declines in China for Apple. Two years ago, the company reported $16 billion in sales in the same quarter.

Last year, people complained that year-over-year comparisons were unfair because Apple had a blockbuster year in China the year before that. But this time around, comparisons should have been easier, as one analyst noted during the earnings call. And still, sales were down.

Cook himself said at one point that Apple had a pretty strong quarter, despite China. He said that the company grew in four of its five geographical segments. It had double-digit percentage growth in the U.S. and Europe. But the China problem limited the company’s overall revenue growth to just 5 percent for the quarter.

Cook tried to look on the bright side, noting that China revenue was only down 13 percent the first half of this fiscal year, compared to the 27 percent drop the second half of the last fiscal year. Of course, the first half comes loaded with the new phone cycle, so it’s not entirely comparable.

He also talked up the company’s retail stores. After the U.S., China has the second most Apple Stores in the world. Cook said the company had “great results,” with total store revenue up 27 percent in China, though it’s unclear how many new stores the company opened there last year. Some stores had a 7 percent increase in revenue, he said.

“And now seven of our top ten highest traffic stores in the world are in Greater China,” Cook said. “And so that’s the set of things that went in our direction, so to speak.”

Cook also blamed the 5 percent currency devaluation and the weak Hong Kong economy.

“We did perform about where I thought we would,” he said of China. “At least I thought it would be similar to the previous quarter, and it was. What I now believe is that we’ll improve a bit more during this current quarter, not back to growth, but improve — but make more progress. And we continue to believe that there’s an enormous opportunity there. And in the scheme of things, our business is pretty large there.”

“Not back to growth.” 

It’s not exactly clear what will get Apple back to growth in China, where it has made a massive investment. Perhaps the new iPhones in the fall will do the trick. But those homegrown smartphone brands are likely going to retain a big pricing advantage.

For the moment, it seems that Apple is going to face a rougher long-term ride in China than it was originally expecting.