Image copyright Getty Images

Apple posted a small gain in sales for the third quarter of the year.

While iPhone sales dipped, the company made up the difference in higher revenues in services such as its software store and music service.

Sales rose 1% to $53.8bn (£44.3bn), while net profit dropped 13% to $10bn. The company stemmed some of its drop in sales to China.

The results beat Wall Street estimates and shares gained 3.5% to $216.10 in after-hours trading.

For first time since 2012, iPhone sales represent less than half of company's overall sales. Sales of the device are down by $741m on this period last year.

In China, sales fell 4% to $9.16bn, after a drop of 22% in the second quarter. Exchange rates have made the iPhone expensive for Chinese customers.

Apple forecast sales of between $61bn and $64bn for the final three months of its financial year.

You'll hear critics often say that Apple has failed too come up with anything interesting since the iPhone. And that Tim Cook, the man who took over from Steve jobs, is yet to come up with anything interesting at all. But that criticism is increasingly untrue, at least when it comes to Apple inventing new areas of business.

This quarter underlines that: despite iPhone sales continuing to shrink, the firm's revenues are up, thanks to booming success with its Wearables, Home and Accessories category (so: Apple Watch, mostly, and AirPods) and continued growth of it Services (App Store, Apple Pay, Apple TV, Apple Music etc).

The number of people paying Apple for some kind of subscription has risen by 55% in the past year to 420m. Apple expects that number to go up fairly dramatically over the next year thanks to the launch of its big-budget subscription TV service, Apple TV+.

Even China brought somewhat good news for Apple this quarter. Sales were down 4% in the country, which the company is seeing as being much better as it could have been given the extreme turbulence created by the US-China trade war. If you remove the iPhone from the China figures, Apple's revenues there grew by 17%. That suggests a slowing upgrade cycle, but users still keen to use the iPhones they have and access Apple services.

In short, Apple is in good health. The iPhone is a product in decline, and as a result, the company's profits have taken a hit. Investors understand that this is a firm in a transition, and so far it is going well.