Apple saw sales of its iPhone fall for a second consecutive quarter.

The decline of 15% was reported in the company’s third quarter financial results but sales weren’t as bad as expected.

The company sold 40.4 million iPhones in Q3, down 15% from a year ago, but this was just ahead of analyst expectations of 40.02 million.

The impact of decline sales was that the company’s revenue fell by 14.6% in Q3, ended 25th June. Declining sales are expected to continue for Apple as it forecast further falling sales in the fourth quarter to between $45.5bn and $47.5bn.

Problems started in Q2 when the company reported the first drop in iPhone sales since the 2007 launch. The reason why it is such a concern is that the iPhone makes up for around two-thirds of Apple’s sales.

A slowdown in sales saw profit drop 27% to $7.8bn in the three months to 25th June.

The fall in sales has come as a result of mature markets holding on to their phones for longer, so less likely to jump to the newest model when it is released, and demand in China declining.

Part of the decline in China is down to economic uncertainty in the country but it is also due to the stronger positions of Samsung and Huawei. China is a significant factor because it accounts for almost a quarter of Apple’s sales.

Apple chief financial officer Luca Maestri, said: "It is very clear that there are some signs of economic slowdown in China, and we will have to work through them.

"We understand China well and we remain very, very optimistic about the future there.”

Despite the problems with the iPhone, the company’s services business, this includes the App Store, Apple Pay, iCloud and other services, generated just shy of $6bn in revenue, up 18.9% from the previous years.

The hope for Apple is that growth in the services business will help to balance out the decline in iPhone sales. The services business is now the company’s second largest, after the iPhone, ahead of gadgets such as the iPad and Mac.

For Apple this is good business as it is recurring and linked to its installed base, the CFO said. Music for example has been a success with the streaming segment.

The growth in this segment makes up somewhat for the 16% revenue fall in the quarter for “other products” which includes devices such as the Apple Watch and iPod. A second generation Apple Watch is rumoured to be coming out later this year.

Although Apple may have ongoing problems in China, the company has seen 51% growth in iPhone sales in India, Apple CEO, Tim Cook, told analysts: "India is now one of our fastest growing markets … We're looking forward to opening more retail stores in India down the road, and we see huge potential."

Cook was keen to look more long-term at things like augmented reality, artificial intelligence, and other technologies. To back this up it was revealed that Apple increased its R&D spending by 26% in the quarter to $2.6bn.