SAN FRANCISCO (AP)--Apple says iPhone sales fell for the second quarter in a row, putting a damper on revenue and profit for the period ending June 30.

The tech giant sold 40.4 million iPhones in the quarter, down 15 percent from a year earlier. Profit fell 27 percent to $7.8 billion, while revenue dropped 15 percent to $42.4 billion.

Apple also sold fewer iPads, Macs and smartwatches. Overall results were slightly better than forecast by Wall Street analysts, who said consumers just aren't as excited about the newest iPhone models.

The one bright spot was a 19 percent revenue jump for the Apple segment that includes iTunes, Apple Music, and the App Store.

Chief Financial Officer Luca Maestri said online services are increasingly important to Apple, since their financial contribution is increasing.

--Associated Press.