Over the past ten years, Apple (NASDAQ:AAPL) stock has soared nearly 1,300% thanks to robust demand for the iPhone and iPad, which together accounted for 71% of the company's top line last quarter. Between fiscal 2004 and 2014, Apple's annual revenue soared 2,108% to $182.8 billion.

AAPL Chart

Source: Ycharts.

But looking ten years down the road, things look murkier for Apple. After Steve Jobs passed away in 2011, Apple merely refreshed and fragmented its core products for three years. Its first new device under CEO Tim Cook, the Apple Watch, won't arrive until next year.

Therefore, is Apple a stock that investors should hold until 2024, or is it one that should eventually be sold?

Apple's biggest weakness
The biggest problem for Apple is its lack of product diversification. In the fourth quarter of 2014, it relied on iPhone sales for 58% of its revenue. Although iPhone revenue rose 21% year-over-year thanks to the launch of the iPhone 6 and 6 Plus, it's a growth trajectory that will be tough to sustain over the next ten years.

Source: Compiled by author from Apple 4Q earnings.

The moment that iPhone sales stop rising, Apple stock will tumble. To prevent that from happening, Apple encourages brand loyalty by tying all app and media purchases to an Apple ID, ensuring that iPhone users think twice before switching to an Android device. That strategy, enhanced by the iPhone's premium appeal, pays off. In July, Morgan Stanley's Alphawise tracker found that 90% of iPhone users stick with Apple, compared to a 77% retention rate for Samsung.

While Apple's retention level is impressive, it's hard to say if those customers will remain loyal ten years from now. If interest in the iPhone wanes and Apple reduces its average selling price to compete with Android devices, it will lose its premium appeal. Google's (NASDAQ:GOOG) (NASDAQ:GOOGL) expanding ecosystem, which is now reaching into cars and homes, could also convince new smartphone buyers that Android phones are simply better suited for a Google-dominated world.

Apple's walled garden
Apple has been beaten before. Back in the 1980s, Microsoft (NASDAQ:MSFT) crushed Apple by releasing its operating systems on IBM clones manufactured by a wide variety of companies. Today, Google is using the exact same play by encouraging hardware manufacturers to install Android on mobile devices.

Both Microsoft and Google's strategies cornered Apple into its own walled garden. When the market favors Apple, that's a defensive advantage, since Apple's OS and hardware remain unique to the company. But if Apple products fall out of favor, the company gets stuck with proprietary hardware and software platforms that fewer developers are willing to develop software for.

For now, Apple has nothing to fear. Rising iPhone and Mac sales are easily offsetting declining iPad sales. Its iOS App Store has 1.2 million apps, compared to Google Play's 1.3 million apps. But if sales of iPhones and Mac started declining, Apple's own walls will prevent it from aggressively expanding the way Microsoft and Google can do through software.

Apple's lack of innovation
Under Jobs, Apple was a fierce growth stock. Under Tim Cook, Apple became a mature one which entertained Wall Street demands by buying back shares (funded by debt) and paying dividends.

AAPL Stock Buybacks (TTM) Chart

Source: Ycharts.

Apple has also started reacting to market trends, rather than defining them. The iPad Mini, the iPhone 5c, the iPhone 6 Plus, and the Apple Watch are respectively reactions to 7-inch tablets, cheap Android phones, phablets, and smartwatches. That's the key difference between Jobs and Cook -- Jobs boldly introduced products that the public didn't know they wanted yet, but Cook launches products based on existing market trends.

The iPhone and iPad were both widely criticized prior to their launches. Back in 2007, Bloomberg's Matthew Lynn said the iPhone was "nothing more than a luxury bauble that will appeal to a few gadget freaks." Prior to the launch of the iPad in 2010, GamesRadar's Mikel Reparaz predicted that the tablet would bomb due to its high price, clumsy touch controls for games, and the fact that "tablet PCs are already in wide use by serious visual artists."

Instead, the iPhone and iPad easily crushed the smartphones and tablets that came before. By comparison, the Apple Watch doesn't come close to "crushing" Android Wear or other wearable devices.

The ten year plan
A lot can change over a decade. That's why Apple isn't a stock that investors should buy and simply hold forever. Its business has some incredible strengths, but it also has glaring weaknesses.

If Apple can't properly diversify its top line and iPhone sales slip, the stock could falter. If Apple subsequently boosts buybacks and dividends to placate shareholders, it could tie up the cash it needs to make major acquisitions. Most importantly, investors should remember that Apple's walled garden can both help and hamper its long-term growth. However, if Apple successfully rolls out new products, the stock could soar higher as the Apple brand expands beyond phones and tablets.