Mr. Cook noted that sales had dropped from a high level: In the first quarter of 2015, sales were 80 percent higher than in the same period in 2014. But the decline announced on Tuesday is a setback for one of the most beloved brands in China.

China’s young, middle-class consumers are increasingly willing, analysts say, to try phones from the many competitors — including Huawei, Meizu and Xiaomi — that seek to compete with Apple on technical specifications and aesthetics but that offer their models at a few hundred dollars cheaper.

Many customers like Mr. Yu, who is 29 and self-employed, consider the phone they use part of their personal identity, leading them to look at a broad range of available models. That being the case, Apple will have to fight to maintain its dominance of the high end of the market.

Apple also faces other obstacles in China. Last week, the company’s iBooks Store and iTunes Movies services were shut down by a Chinese regulator, just six months after they started operating. The rare about-face by China suggests that Apple could face further pressure as the Chinese government increases its scrutiny of American companies’ operations within its borders.

In the past four years, with strong demand in China for its products, Apple increased the number of retail stores in the country to 35 from just a handful, and Mr. Cook said on Tuesday that there would be 40 by the end of June. The company has also been able to tap into the enormous customer base of China’s largest wireless carrier, China Mobile, after years of talks resulted in an agreement in 2013 that brought the iPhone to the carrier. The deal contributed to Chinese consumers spending $59 billion on Apple products in the latest fiscal year.