Apple's (AAPL 1.91%) stock price has more than tripled over the past three years, silencing the bears who claimed its best days were over. Its iPhone business remained stable, newer hardware devices like the Apple Watch and AirPods attracted more consumers, and its prisoner-taking services ecosystem locked in over 600 million paid subscribers.

The next few years could also be promising for Apple. Its first family of 5G iPhones could spark lots of upgrades this year, its streaming services should gain more subscribers, and it could gradually expand into the AR and automotive markets. With nearly $200 billion in cash and marketable securities in the bank, Apple still has plenty of ways to expand via new investments and acquisitions.

As a long-term Apple investor, I still believe Apple's best days are ahead. But I'm also well aware that three big challenges could generate unpredictable headwinds for the tech giant in the near future.

Apple CEO Tim Cook.

Image source: Apple.

1. Apple's App Store battles

A growing list of companies, including Epic Games, Spotify (SPOT 2.49%), and Rakuten (RKUNY -1.75%), are claiming Apple's 30% cut of its App Store revenue is anti-competitive.

Last March, Spotify and Rakuten both filed antitrust complaints against Apple in Europe. Spotify claims Apple's cut of its in-app revenue is too high, and that those fees give Apple Music an unfair pricing advantage on iOS devices. Rakuten, one of Japan's top e-commerce companies, also claimed Apple's fees made it impossible for its own e-books subsidiary, Kobo, to compete against Apple Books.

Epic Games' Fortnite.

Image source: Epic Games.

Last August, Apple booted Epic's Fortnite from the App Store after it bypassed Apple's payments system with direct in-app payments. Epic and Apple subsequently sued each other, and the case could drag on for years -- but a ruling in Epic's favor could allow more developers to circumvent Apple's payment system.

Meanwhile, Microsoft (MSFT 0.61%), Alphabet's (GOOG 0.92%) (GOOGL 0.90%) Google, and other companies want to launch their cloud gaming platforms on iOS as single stand-alone apps that can play large libraries of games.

Apple wants these platforms to offer their games in individually wrapped installations so they can be monitored and monetized, and this byzantine structure could spark new antitrust complaints against the company. All these issues could throttle the growth of the company's App Store, which accounts for a large portion of the revenue for Apple's services segment -- which generated 17% of Apple's overall revenue in fiscal 2020.

2. Apple's war against online advertisers

Apple's upcoming iOS 14 update will allow users to opt out of data-tracking features in apps. That change, which Apple claims will protect users' personal data, could cause serious problems for companies like Facebook (META 2.10%) and Alphabet's Google, which both generate most of their revenue from targeted ads.

Facebook, which claimed the change could reduce its Audience Network ad revenue by over 50%, is reportedly preparing to file an antitrust suit against Apple over the planned update.

Google and other online advertisers could eventually follow Facebook's lead and try to loosen Apple's iron grip on its walled garden. It's unclear if they'll succeed, but those clashes could cause antitrust regulators to take a much closer look at Apple's control over iOS apps.

3. The rise of the Chromebooks

Google's Chromebooks, which are manufactured both internally and by third-party partners, outsold Apple's MacBooks in full-year shipments for the first time ever in 2020, according to IDC.

Google's Pixelbook.

Image source: Google.

That might not seem like a major threat, since Chromebooks usually target lower-end users while MacBooks aim higher. Chromebooks are generally considered more of a threat to low-end Windows PCs rather than MacBooks, especially in the education market.

However, Google's high-end Pixelbook, which was initially launched in 2017, also highlighted the potential of high-end Chromebooks. Several other PC makers, including Asus and Acer, have already followed Google's lead with higher-end Chromebooks, which could pull more affluent users away from MacBooks.

The growth of the Chromebook market -- along with Microsoft's ongoing launches of new Surface tablet devices -- could impact Apple's Mac business, which accounted for 10% of its sales last year. Moreover, new variations of the Chromebook, including detachable tablets that run Android apps, could also affect Apple's iPad business, which still generated 9% of its sales last year.

The key takeaways

Apple's core business is strong, but investors shouldn't overlook these threats. The intensifying clashes over in-app payments, data-tracking, and targeted ads could spark tougher antitrust moves against Apple, while Google and Microsoft both remain formidable rivals in the ever-shifting hardware market.