SAN FRANCISCO — Have consumers lost their affection for Apple gadgets, or are they just waiting for the new iPhones to come out in September?
Every one of Apple's major hardware businesses posted declines in the three months that ended in June, the company reported on Tuesday.

It was the second quarter in a row of falling sales as the technology giant wrestles with a saturated market and a slow shift to services, not gear, as a major driver of the company’s profits. Over all, the company posted revenue of $42.4 billion, down 15 percent compared with the same quarter last year.
The quarter that ended in March was the first time in 13 years that revenue at Apple, which has spent much of the last five years as the world’s most valuable company, was lower than in the same period a year earlier.
The introduction of the 4-inch iPhone SE earlier this year appeared to hurt revenue and profits as some customers bought that device instead of Apple's bigger, more expensive models.
"Apple is moving from only iPhones matter to iPhones and services matter," said Ben Schachter, an analyst with Macquarie Securities, who estimated that nearly one-third of the company’s quarterly profits came from services like App Store purchases, Apple Music subscriptions and the iCloud storage business. Revenue in the segment rose 19 percent to $6 billion.
Still, Apple is still primarily a hardware company and its products did not fare well.
The number of iPhones sold dropped 15 percent, compared with the same quarter a year ago, and revenue plunged 23 percent. The number of Macs sold fell 11 percent, and the number of iPads fell 9 percent. And sales of the Watch, Apple’s newest product, plunged 55 percent compared with the previous year, according to the research firm IDC, which published its own assessment on Friday since Apple does not break out its smartwatch sales.
Net income was $7.8 billion, or $1.42 a share, down 27 percent.
Apple’s weak results were partly a result of the company’s position at the end of its product cycle. In September, it is expected to announce upgrades to its iPhone hardware and software, which happens every two years. Many Apple customers hold off buying a new phone in the months before a big release so that they can get the newest model.
But Apple is also wrestling with longer-term issues. The smartphone market in developed countries like the United States is saturated, and newer markets like India buy hardly any iPhones.
China, long a source of growth for Apple, is itself slowing down, with revenue down 33 percent. But revenue from Europe was down just 7 percent. In an interview, Luca Maestri, Apple’s chief financial officer, said that Apple had experienced little impact from the Brexit vote on sales in Britain.
The declines were less steep than Wall Street had expected after the gloomy outlook Apple had laid out three months ago. Shares of Apple rose about 7 percent in after-hours trading.
“The valuations had been driven down based on expectations of no growth,” said Walter Piecyk, an analyst with BTIG Research. “Now investors can start focusing on what they're going to say in September about the new products.”
Mr. Maestri said the quarter's sales drop looked worse than it was because Apple held back on shipments to retailers, particularly in China, so that the stores could clear out their existing inventory of Apple gear. On that basis, iPhone sales were down only 8 percent, Mr. Maestri said.
The revenue from iPad sales also rose as customers bought the more expensive iPad Pros even as sales of traditional iPads sank.
Apple projected that the next quarter would be a down quarter, but after that, when the new phones are fully in the market, Wall Street expects the company to return to growth.
Timothy D. Cook, Apple's chief executive, suggested that Apple TV in particular might be the basis for substantial innovation but offered no specifics.
Mr. Piecyk said that Apple was also increasing its spending on research and development — a sign of new products in the pipeline beyond simple updates of existing ones.
"There are so many places of pain out there in our lives — the living room, the car — where there's room for substantial improvement," he said.