Apple said last night that its profits held steady in the most recent quarter, with revenue growth in music, movies, apps and other services offsetting slumping iPhone sales.

This sparked a rally in shares of the California tech giant on Wall Street. 

Profit in the final quarter of last year was $20 billion - a dip of less than 1% - on revenue of $84.3 billion, despite money from iPhone sales falling by 15% from the same time in 2017. 

The full extent of the slump in iPhone sales was not clear because Apple for the first time stopped reporting unit sales for its iconic smartphones. 

Overall revenue for Apple dipped nearly 5% from a year ago, in line with the lowered guidance earlier this month that stunned the market and hammered shares of the iPhone maker.

"While it was disappointing to miss our revenue guidance, we manage Apple for the long term, and this quarter's results demonstrate that the underlying strength of our business runs deep and wide," chief executive Tim Cook said in the earnings release.

The update for Apple's first fiscal quarter to December 29 was greeted with relief on Wall Street, as shares rallied 5.75% in after-hours trade.

Apple had been under pressure to show it can weather the slump in the global smartphone market and diversify its revenue base, and the latest results appeared to satisfy the market. 

Services revenue reached an all-time high of $10.9 billion, up 19% over the previous year. Apple also boosted sales of wearables and accessories by 33% from last year.

Cook has long emphasised the potential of that side of Apple's business.

"Our active installed base of devices reached an all-time high of 1.4 billion in the first quarter, growing in each of our geographic segments," Cook said. 

"It's driving our Services business to new records thanks to our large and fast-growing ecosystem," he added.

Apple CEO Tim Cook

An Apple streaming music service launched in mid-2015 now boasts more than 50 million subscribers. 

And the California-based company looks to build momentum for its Apple TV service, with deals to have it installed on television models coming out this year. 

During the earnings call, Cook confirmed that Apple plans to produce its own shows in a move that could challenge streaming television giants Netflix and Amazon Prime, which have invested heavily in original content.

"We will participate in the original content world," Cook said while discussing Apple's plans for video content.

"We have signed a multi-year partnership with Oprah," he said, adding that Apple has hired "some great people" whom he is confident in. 

Apple took a hit in the "Greater China" region, where revenue plunged almost 27%, which had been expected following the company's latest revenue warning. 

While Apple appeared to avoid the worst with its latest results, the long-term outlook is less certain, some analysts say. 

Cook contended that weak economic conditions in China had hurt iPhone sales, but said Apple had record services revenue there despite game apps facing difficulties getting approved by regulators. 

Analysts aid the problems with iPhone sales and China pose significant threats to Apple's future.

They said that Apple is fortunate in having a strong base of fans and many consumers who are bought into its ecosystem of services, but without device innovation, even this will be insufficient to maintain iPhone market share in the face of rising competition.