New York CNN Business  — 

iPhone sales continue to decline and, for the first time in years, no longer account for the majority of Apple’s overall revenue.

Apple (AAPL) said Tuesday that iPhone sales for the quarter fell to about $26 billion in the three months ending in June, a decline of nearly 12% from the same period a year earlier.

Even with this decline, Apple managed to grow its overall revenue by a slight 1% from the prior year as the company finds more traction selling wearable devices and digital services, including Apple Pay and Apple Music.

The Services segment, as Apple calls it, hit nearly $11.5 billion in sales for the quarter. Apple’s Wearable, Home and Accessories segment, which includes products like Apple Watch and AirPods, topped $5 billion in quarterly revenue for the first time.

Apple’s iPhone sales accounted for just 48% of its overall revenue for the quarter, highlighting the broader shift underway at the company as it works to diversity its revenue streams.

Shares of Apple rose 4% in after-hours trading Tuesday following the earnings report.

After years of defying gravity, Apple’s core iPhone business has now seen sales decline for three consecutive quarters. The slowing demand for iPhones comes as customers hold onto their smartphones longer and Apple works to reverse a slowdown in China, once its most promising market, amid an ongoing trade war with the United States.

On Tuesday, Apple reported sales in the China region fell 4% from the prior year, an improvement from a more than 20% decline in the prior quarter. On a conference call with analysts after the release of the report, CEO Tim Cook said Apple actually grew in “mainland China.”

Cook cited a “confluence” of factors helping to improve Apple’s business in China, including a government stimulus as well as trade-in and financing programs implemented in its retail stores.

Cook said Apple “couldn’t be happier” with its “progress” in China’s market.

But there is still reason for concern. The trade war has continued to drag on. And last week, President Donald Trump tweeted that he will refuse to exempt Apple from tariffs on parts for the Mac Pro, which Apple is said to be building in China.

“We’ve been making the Mac Pro in the US and we want to continue doing that,” Cook said on the call. “We’re explaining that and hope for a positive outcome.”