Check out the latest Apple earnings call transcript.

Apple (AAPL -1.22%) didn't end its year well. CEO Tim Cook issued a rare letter to shareholders in which he slashed the company's earnings guidance for the fourth quarter from a range of $89 billion to $93 billion down to $84 billion. That's a $7 billion shortfall if you had assumed the company would deliver a number in the middle of its original range.

The shortfall came because iPhone sales have been slow in China as well as in emerging markets. In addition, the company has been hurt by slower adoption for its newest phones -- a problem it exacerbated by having its latest operating system, iOS 12, improve the performance of older phones. Those are big issues for a company for which iPhone sales have accounted for at least 50% of revenue, and sometimes nearly 70%, since the beginning of 2013.

Customers look at iPhones in an Apple store.

Apple has reported slower-than-expected iPhone sales. Image source: Apple.

Whither the iPhone?

Phone replacement used to be tied to contracts with the major wireless carriers. Customers generally got a heavily subsidized phone in exchange for a two-year commitment to the carrier. At the end of that two years, most consumers would upgrade their phone as part of the process of signing a new contract.

That's not how things work anymore. The four major carriers -- AT&T, Verizon, T-Mobile, and Sprint -- now charge for phones separately, though they all offer installment plans, and some offer leases. That has given consumers a better look at how much their phone actually costs, instead of having that number hidden within paying for the service.

It's a change that now has people holding on to their phones longer. Globally, smartphone sales appear to have passed their peak, with year-over-year shipments falling in each of the past four quarters, according to data from IDC, which noted that Apple isn't alone in struggling in China.

"China's domestic market continues to be challenged as overall consumer spending around smartphones has been down," said IDC Program Vice President Ryan Reith in a press release. "High penetration levels, mixed with some challenging economic times, has slowed the world's largest smartphone market."

Reith, however, doesn't believe further declines are inevitable. In fact, he sees the situation in China getting better.

"Despite this, we believe this market will begin to recover in 2019 and beyond, driven in the short term by a large, built-up refresh cycle across all segments, and in the outer years of the forecast supported by 5G migration," he said.

Is Apple a buy?

While it's concerning that iPhone sales are slowing because consumers are waiting longer to upgrade, it's not enough to scare me away from Apple. The company has acknowledged it has a problem, but it's also already made a major move to account for it.

Consumers may upgrade less often, but they'll still upgrade. Apple understands that and has priced its newest devices accordingly. The base model iPhone 6 cost $649 at launch, while the entry-level XS costs $999. That's an increase of more than a third, and it shows that Apple understands its audience.

Yes, the company will have to deal with lumpier upgrade cycles as consumers around the world realize that their existing phones are good enough that they don't need a new one quite as often. That group will be counterbalanced by the Apple enthusiast audience that considers owning the new phone a badge of honor -- and one that it seems quite willing to pay for.

Apple revenue may become less predictable on a quarterly basis as some consumers change their upgrade habits. That works in two directions. There will be unexpectedly slow quarter, like Q4, but there will also be unexpectedly large growth quarters driven by outside factors, which could be anything from a positive economic outlook to tax refunds to carriers that add 5G in various markets.

The market has changed, and Apple is adapting along with it. That makes the company a buy for anyone taking a long-term view of the company.