Apple managed to eke out growth in China in the June quarter, helped by record services and iPad revenue in the world’s second-largest economy.

The U.S. technology giant reported Greater China revenue of $9.33 billion for the company’s fiscal third quarter ending in June. That’s up 1.9% year-on-year. China is Apple’s third-largest market by revenue.

Apple’s services revenue, which includes products like the App Store and Apple Music, helped the company, while iPad sales also shot up.

Chief Executive Tim Cook said that services revenue set a new June quarter record. Chief Financial Officer Luca Maestri added that the iPad also set a June quarter revenue record in Greater China.

iPad was helped in the June quarter there (China) by the work from home and distance learning as it was in other geographies. And the Mac also grew strong, double-digit during the quarter. And services set a new June quarter record there,” Cook said on the earnings call.

We also continue to see extremely high new customer rates on Mac and iPad there. To give you a perspective, about three out of four customers that are buying the Mac are new in China and about two out of three that are buying the iPad are new. And so these are numbers that we’re super proud of.”

Apple does not provide a specific revenue breakdown for product by region.

Second quarter App Store gross revenue, which makes up a small part of the overall services division, grew 13% year-on-year to $4.4 billion, according to data from Sensor Tower.

Meanwhile, iPhone sales bounced sharply in the second quarter versus the first quarter in China, which was the height of the coronavirus crisis in the country. Apple was forced to shut down stores and sales took a hit.

But Apple sold 13 million iPhones in the June quarter, up 62% year-on-year, according to data from Shanghai-based CINNO Research. That figure was 225% higher than the 4 million iPhones sold in the first quarter of 2020.

The continued popularity of the iPhone 11 range, boosted by discounts, helped Apple’s momentum. And the cheaper second generation iPhone SE also helped the company. In fact, that device was among the top 3 best-selling iPhones in China in the second quarter, according to Counterpoint Research.

As I mentioned before, the iPhone 11 has been our best selling phone and has been number one in urban China, and so we’re very, very proud of that,” Cook said.