Apple's (AAPL -1.19%) stock rallied roughly 48,660% over the past 20 years and recently hit a new all-time high. Once dismissed as an also-ran of the tech sector, Apple's introductions of the iPod, iPhone, and iPad under Steve Jobs turned it into one of the world's most valuable tech companies.

After Jobs passed away in 2011, Apple continued to evolve under Tim Cook with new iPhones, fresh hardware devices like the Apple Watch, and the expansion of its software and services ecosystem. Apple also reinstated its dividend, initiated aggressive buybacks, and invested in next-gen technologies like augmented reality and connected vehicles.

Apple became a trillion-dollar company in 2018 and a $2 trillion company last year. But after those massive long-term gains, investors who don't already own Apple might be wondering if it's too late to buy the stock. Let's examine the bearish and bullish cases for Apple to decide.

The Apple Store on 5th Avenue in New York.

Image source: Apple.

Why it might be too late to buy Apple

The bears often cite Apple's dependence on the iPhone, which generated 54% of its revenue in the first nine months of fiscal 2021, as its main weakness. Apple's iPhone sales rose this year as more users bought its first lineup of 5G iPhones, but that growth will likely decelerate next year as fewer consumers consider the iPhone 13 to be a crucial upgrade. Intense competition and the commoditization of the smartphone market also remain major long-term threats to Apple's biggest business.

It's unclear if Apple will ever deliver another revolutionary product like the iPhone, and the lack of clarity regarding its future plans is worrisome.

Another soft spot is Apple's dependence on China, which accounted for 19% of its revenue in the first nine months of the year. China is Apple's fastest-growing market, but it's also a minefield of unpredictable regulations, tariffs, and nationalism-driven boycotts. If the ongoing trade and tech tensions between the U.S. and China escalate, Apple could be an easy target for retaliatory regulations, taxes, or bans.

The bears will also point out that Apple has grown too dependent on buybacks in recent years. It spent $82.4 billion on buybacks over the past 12 months, and even funded some of those purchases with fresh debt. Apple could arguably have spent more of that cash on investments and acquisitions to diversify its business away from the iPhone.

Lastly, Apple's expansion of its services ecosystem faces significant long-term challenges. Its App Store faces pressure to lower its fees, while many of its new subscription services (Apple TV+, Apple Music, and Apple Arcade) are likely operating at losses to lock in more users.

Why it might not be too late to buy Apple

The bulls believe Apple's iPhones will continue to lock in consumers with their prisoner-taking software ecosystems, and that the device's sales -- while cyclical -- will remain stable over the long term.

Apple CEO Tim Cook in front of a photo of an iPhone 12.

Image source: Apple.

Apple also isn't sitting still as it milks the iPhone dry. It's reportedly developing augmented reality devices, an electric vehicle, and other new services to expand beyond single hardware platforms.

As for China, the bulls believe Apple will make concessions (likely in terms of censorship and data protection) to remain in the government's good graces, and that its symbiotic relationship with China through Foxconn (FXCNF 25.07%) -- the country's largest private employer -- will shield it from retaliatory regulations.

The bulls will point out that while Apple spends a lot of cash on buybacks, it was still sitting on $193.6 billion in cash, cash equivalents, and marketable securities last quarter -- which gives it plenty of room for future acquisitions. Furthermore, it only issued new debt because interest rates were so low.

As for the expansion of its ecosystem, Apple can offset the losses at its newer subscription services, which now serve more than 700 million subscribers worldwide, with its higher-margin App Store revenue -- even if certain developers and regulators pressure it to lower its 15%-30% cut. Locking in more subscribers also tethers them more tightly to the iPhone and its other hardware devices.

Lastly, Apple's stock is still reasonably valued. Analysts expect its revenue and earnings to rise 33% and 70%, respectively, this year, followed by more modest growth next year as it laps the launch of the iPhone 12. The stock trades at 27 times forward earnings and seven times next year's sales.

It's still a great long-term investment

I traded in and out of Apple for years before buying a long-term position in early 2018. If I had simply bought and held Apple instead of trading it before then, I'd be sitting on much bigger gains.

Therefore, I believe Apple is still a great long-term investment, and it still isn't too late to buy the stock. It probably won't replicate its gains from the past two decades over the next 20 years, but its core businesses remain strong, its brand inspires fierce loyalty, and it has plenty of cash to fund its future expansion plans beyond the iPhone.