Apple’s iPhone business is resilient to economic concerns and logistics bottlenecks.

Last year, the group was able to increase iPhone sales in a smartphone market that had shrunk overall. That, combined with a growing service business, more than offset declines in the company’s other devices.

Overall, Apple’s sales in the third quarter ended June increased by two percent to around 83 billion dollars (81 billion euros). The bottom line, meanwhile, was a 10.6 percent drop in profits to $19.44 billion, as Apple announced after the US stock market closed.

Analysts had expected worse numbers. The stock gained around 3 percent in after-hours trading.

iPhone sales grew to nearly $40.7 billion from $39.6 billion a year earlier. According to calculations by the analysis company Canalys, Apple was able to expand its share of the smartphone market, which had shrunk by nine percent, in the past quarter thanks to good sales of the iPhone 13.

In the service business, which includes, for example, subscription income from Apple’s music and video streaming offerings and app fees, there was even more significant growth from $17.5 to $19.6 billion. Meanwhile, Mac computers and iPad tablets have declined.