Apple’s iPhone sales are still sputtering while the company tries to offset the decline by milking more money from digital services such as music.

“Apple has become a victim of its own success and there also appears to be a lack of urgency. Apple is still the iPhone company and it may always end up being the iPhone company.”

The latest evidence of the iPhone’s waning popularity had been expected. Even so, the confirmation in Tuesday’s fiscal third-quarter earnings report underscored the challenges facing a company that has been riding the smartphone revolution for the past decade.

The iPhone’s downturn is the main reason Apple’s profit for the April-June period fell 13% to $10 billion.

The good news is Apple has several ways it can still make money from the 900 million iPhones in use today. Besides selling new models to current iPhone owners after the current devices eventually wear out, Apple has positioned itself to make billions of dollars more from music, video and gaming subscriptions, maintenance plans and commissions from apps selling their own wares on iPhones.

The bad news is that Apple has still been relying on the iPhone for more than half its revenue so this year, and the company hasn’t proven it can be as adept peddling digital services as it has been making sleek devices. For instance, Apple’s 4-year old music streaming service still lags Spotify. The company is preparing to launch a video streaming service more than a decade after Netflix pioneered the concept.

And a recently opened U.S. Justice Department investigation is expected to look into whether Apple unfairly favors its own services and gouges others through its app store, raising the specter of changes that could further depress its revenue.

“Apple has become a victim of its own success and there also appears to be a lack of urgency,” Chatham Road Partners analyst Colin Gillis said. “Apple is still the iPhone company and it may always end up being the iPhone company.”

The lingering doubts hanging over Apple are one reason why Apple’s stock price remains well below its peak of $233.47 reached last October, even as the rest of the market has soared to record highs. The company’s shares gained 4% to $217.55 in extended trading after the release of its numbers for the April-June period. The stock was still up 4.2% to 217.61 around 1:30 p.m. on the East Coast.

The rally may have stemmed from another encouraging sign that emerged in the quarterly report. Apple’s total sales in China decreased by 4% in the quarter compared with a year ago, after plunging 25% during the first half of the company’s fiscal year. That dramatic improvement eased fears that the Trump administration’s trade war in China might trigger a consumer boycott of Apple’s products in the country in retaliation.

“We couldn’t be happier with the progress,” Apple CEO Tim Cook said during a Tuesday conference call. He credited both Apple’s own price cuts and economic stimulus programs rolled out by China’s government to counteract the effects of U.S. tariffs.

Worldwide revenue from iPhones during the quarter totaled $26 billion, a 12% decrease from the same time last year. It marks the third straight quarter of eroding iPhone sales, something that has only happened once before.

Apple is forecasting its total revenue for the July-September period will fall from last year, a sign that it is bracing for yet another drop in iPhone sales. That’s particularly striking because the tech giant typically gets a big boost from the release of new iPhone models in late September. But the mid-range projection of $62.5 billion of revenue for the period was better than the $60.9 billion anticipated by analysts, providing another sign of hope for investors betting on Apple’s resilience.

Even with the iPhone in decline, Apple remains a financial powerhouse. Total revenue grew 1% from last year to $53.9 billion.

The services division remains the biggest area of growth, with revenue surging 13% from last year to $11.5 billion in the past quarter.

© The Associated Press. All rights reserved.