Apple Inc sold more than 40.4 million iPhones in the quarter ending June 30, down 15% from the same quarter last year. This was the company’s second quarterly drop in iPhone sales. However, sales were still better than expected, and the marginally better forecast for this quarter led to the company’s shares rising 7% in after-hours trading to $96.63 (around Rs 6,500), though its stock has traded down more than 20% in the last year.

The demand for iPhones has also reduced because of the uncertain economic climate in China, Reuters reported. However, Apple reported a 19% sales jump in the segment including iTunes, Apple Music and services like iCloud storage, Associated Press said. The segment produced more in sales than Apple brought in from quarterly sales of either iPads or Macs. Patrick Moorhead, analyst at Moor Insights & Strategy, told Reuters that this segment was a “very big bright spot for Apple”.

Chief Financial Officer Luca Maestri told Reuters that the company’s performance had exceeded his expectations in a quarter “weighed down by tough foreign exchange rates and difficult comparisons with blockbuster iPhone 6 sales from the previous year”.