Apple is starting to thrive again, even as the iPhone stalls

Apple just managed to increase its revenue in its latest quarter compared to a year earlier, reversing the year-over-year contraction in its previous two quarters that had heightened investor concerns about its iPhone business and exposure to a US-China trade war.

Wall Street had expected Apple to generate around $53.5 billion in revenue for its fiscal third-quarter (its fiscal year ends in September), pretty much square in the middle of Apple’s own estimations from last quarter. The company in fact posted $53.81 billion in revenue, just about 1% up from from the $53.3 billion it brought in during the same period last year, and enough to stop the company’s multi-quarter revenue slide.

Investors seemed pleased with the news, with Apple’s stock price up about 4% on its closing price to $217.60 in after-hours trading.

Apple is in the middle of an awkward transition. For a decade, the iPhone has been its cash cow, turning Apple from a successful computer company into one of the richest companies in history, briefly flirting with a $1 trillion market capitalization. But it has struggled to replicate the sheer success of the iPhone with follow-up products such as the iPad and Apple Watch. That being said, the scale at which Apple now operates is unlike most other hardware companies in history: Even its smallest business line is a roughly $25-billion-per-year business, which would squarely put every business line Apple runs into the Fortune 200 as a separate company.

Apple has struggled to keep up the momentum with iPhone sales globally, and earlier this year it announced it would miss its guidance for the quarter primarily due to weak sales in China. Apple’s considerably pricier smartphones were struggling to compete with local brands like Huawei, Oppo, or Xiaomi. During the latest quarter, the iPhone saw a 13% drop in revenue over the same period last year, pulling in $25.98 billion, the lowest revenue the iPhone has generated in a single quarter in two years.

Apple has been attempting to pick up the slack in iPhone sales by building out a larger offering of services for loyal Western customers, including a new TV service filled with original content, and an exclusive gaming platform, both of which are expected to launch this fall. And it seems that, to some degree, the strategy has been working. Apple’s services business—which includes sales of apps, games, movies, music, cloud storage, and Apple Pay fees—has been the company’s second-largest business for the better part of three years now.

The recent focus on services has helped ensure that even though iPhone sales continue to tumble, Apple is still growing overall. Services accounted for $11.46 billion in revenue this quarter, a 20% jump over the same period last year. It’s worth noting, though, that there was only a minor bump in revenue when comparing services revenue over consecutive quarters: the business unit has been on a tear in recent years, and investors will want to make sure that this doesn’t indicate a slowdown heading into the second half of the year.

Beyond services, Apple’s smaller hardware divisions all pulled their weight in the quarter, each posting a gain over the same period last year. The company’s accessories business in particular had a strong quarter, overtaking the iPad and only about $0.3 billion behind the Mac from becoming Apple’s second-largest hardware business.

The accessories business line, which includes sales of Apple’s AirPods wireless headphones, the Apple Watch, Beats headphones, the HomePod speaker, and other accessories, generated $5.525 billion in revenue for the quarter, a jump of nearly 50% over the same period last year. The argument that these have actually been the most exciting products that Apple has made in recent years seems to be ringing true. On the company’s earnings call, CEO Tim Cook said it was “an absolutely blow-out quarter for wearables,” adding that its services and wearables business alone is now the size of a Fortune 50 company.

The outlook for next quarter isn’t particularly rosy, though, and Apple once again thinks it could fall short of what it did in the same quarter last year. It’s expecting to generate between $61 billion and $64 billion in revenue—it pulled in $62.9 billion in the year-ago quarter.

Cook said during the earnings call that the company expected to launch in August its new credit card, which has now been tested by hundreds of Apple employees.