Apple's (AAPL -1.22%) journey from niche personal computer player to technology powerhouse began with the iPod, and was fully realized with the iPhone. The company's smartphone has changed more than the company. By more or less creating a template for modern smartphones, Apple has arguably changed the world.

To fully understand how important the iPhone has been to Apple, you have to look at the numbers. The device brought in over 62% of the company's revenue in the second quarter of 2018. That number varies a bit from quarter to quarter, but Apple's smartphone has been its sales driver for years, and it's clearly the company's most important product.

It's also Apple's biggest vulnerability. Whether you consider Apple a buy depends on whether you think the iPhone will remain a viable product or if you believe the company will be able to find its next big thing.

The Apple iPhone X

iPhone has long been Apple's most important product. Image source: Apple.

Can iPhone sales crumble?

Before the iPhone, Blackberry was the dominant smartphone in what was then a fledgling space. That dominance ended in 2007, partly due to the iPhone and partly because of Blackberry's incompetence. The company neglected to keep its roster of phones updated, and basically opened the door for Apple (and others) to take market share.

Apple is not in that position. The company has steadily improved its phone, and kept its devices at least close to the cutting edge of technology. That has made it hard for rivals to win market share: Even if another company adds something first -- like wireless charging -- it's clear that Apple will follow.

That's not to say Apple only follows, however. The company has innovated in mobile payments and facial recognition, and its app store remains the market leader. Apple may have fewer apps, but it had $38.5 billion in 2017 app-based revenue compared to $20.1 billion for Alphabet's Google Play store, according to a report from SensorTower.com.

The only real threats to iPhone are that at some point smartphones could become irrelevant and that people upgrade less often because of a lack of new features. It's unlikely, however, that smartphones will be replaced by wearables or something even more different like implanted technology. Perhaps that will happen someday, but it's not likely to be soon -- and if it does happen, Apple might just lead the way.

A lengthening of the upgrade cycle is possible, but Apple has created an upgrade rhythm where its most loyal customers want the newest phone each year. That could change, but it's not likely to because it's a model based on appearance, not what the phone can actually do.

A chart of Apple sales by product.

Image source: Apple.

What about innovation?

The data in the image above, shows a big sequential drop in iPhone sales, but that's because Q1 contained the holiday period and the launch of iPhone X and iPhone 8. Apple's numbers generally spike when the new phone (or phones) come out and ride that high through the holiday season before leveling out. (The same pattern holds for all its devices in a broad sense.) The number of iPhones shipped in Q2 was up 3% over the prior-year quarter and iPhone revenue jumped 14% year-over-year as average selling price increased.

As you can see above, other than the iPad, which has been a declining business, and the Mac, Apple's other products are comparatively small. Apple TV and Apple Watch are successful, and the Watch is growing its market share, but neither seems likely to ever grow as big as the iPhone.

Apple has also largely missed out on the growing home speaker/digital assistant market dominated by Amazon's Echo/Alexa devices. Its HomePod is, to put it kindly, a niche player in the field, and Apple was very late in bringing it to market.

All of the above show that the company is not bereft of innovation, but it has been unable to create another monster hit. That's not all that shocking, though, as there are very few products in the entire history of technology that rival iPhone's success.

The company's service revenues also have the potential to grow and the company says it's on track to double the 2016 services revenue by 2020. This area includes the app store, Apple Care, Apple Pay, iTunes, and its cloud services business. Some of these areas -- iTunes and the app store -- are mature businesses while Apple Pay and cloud services have major growth potential as consumers become more comfortable using those technologies.

Is Apple a buy?

Yes, the company relies on the iPhone, and that comes with some risk; but it would take a major shift in consumer behavior to make that danger a reality. That could happen -- very few companies stand the test of time --  but it's not likely to occur soon.

So that leaves Apple a cash-rich, dividend-paying company that has shown a reasonable ability to grow its product portfolio. Apple's quarterly dividend is $0.73 per share, resulting in an annual yield at recent prices of around 1.6%. The company also had $267 billion in cash on hand at the end of Q2, according to CNBC, making it unlikely its dividend will go away or decrease in the foreseeable future. Apple's board also recently authorized a new $100 billion stock repurchase program.

Apple stock is a buy because of the strength of the iPhone and the company's brand. There may not be a next iPhone-size hit coming down the development pipeline, but it's possible that Apple will add more Watch-sized hits, and use those to grow its service and software (apps) revenue.

No company has total security from irrelevance. Apple, however, has shown that it can protect its business, and while it has only been hitting singles, not home runs, with recent products, those should grow the company over time.