Apple iPhone sales dropped to less than half of quarterly revenue for the first time in seven years.

CEO Tim Cook described the change as successfully diversifying away from a single product and forecast results above Wall Street targets.

Apple's greater China sales, which had gone into a near free fall earlier this year, dipped only slightly, assuaging concerns that trade tension were undermining Apple's standing in one of its most important markets.  

Shares rose 4.25% after hours.

Moribund global mobile phone sales have led Apple to focus on accessories like the Apple Watch and growth in music, apps, gaming, video and a credit card coming in August. 

In mainland China, Cook said the overall number of Apple device users had grown in the fiscal third quarter, helping to increase the market for its services, whose sales were up by more than 10% there.

But globally, iPhone sales fell 12% to $25.99 billion, after dropping 17% in the previous quarter, and matched Wall Street targets. 

Wearables and other accessories revenue rose nearly 50%, topping expectations.

Services revenue rose 12.6% to $11.46 billion, slowing and slightly missing expectations but setting a new record.

Apple said it expects revenue for the current fiscal fourth quarter of between $61 billion and $64 billion, compared with analyst estimates of $61.02 billion. 

At the high end of Apple's forecasted range, sales would beat the prior year's $62.90billion in sales, despite the fact that analysts expected continued lacklustre iPhone sales until 5G models arrive in 2020.

For the fiscal third quarter ended in June, Apple reported a 1% rise in revenue to $53.8 billion and a 7% drop in earnings per share to $2.18.

Apple did not give the number of active Apple devices, but in January it said it was 1.4 billion, with 900 million of those being iPhones. Investors used the number, called the installed base, as a proxy for how many subscribers it can gain for its services business. 

Cook told investors on a conference call that Apple has 420 million paid subscribers to its own services and third-party apps. The company has set a goal of 500 million by 2020.

Apple said it returned more than $21 billion to shareholders during the fiscal third quarter, including $17 billion in share repurchases. It declared a dividend of 77 cents per share.