Tim Cook and Craig Federighi unveil iOS 8 at WWDC 2014. Getty Images/Justin Sullivan Over the weekend, a gloom-and-doom storyline for Apple started bubbling through Twitter from tech pundits and VCs.

It started with Marco Arment, a big-name developer who made Instapaper and was one of the earliest Tumblr employees. Arment is usually pro-Apple in his comments, but Sunday night he wrote a post on his personal blog admonishing all the bugs in OS X, the operating system for Macs.

Arment's argument is that Apple "has lost the functioning high ground" by forcing itself to release a new version of OS X every year even though it's tough for Apple's software engineers to keep up.

That's not an entirely new criticism. Apple's weakness has always been in its software and services, something a lot of people discovered from the launch of products like Apple Maps and the confusing black hole that is iCloud.

Arment is right about one thing in particular. The competition is so bad that even though OS X may be riddled with bugs, the alternatives are much worse.

Windows 8 is over two years old and still a disaster. (That may get better when Windows 10 launches later this year. We'll see.)

Chromebooks are pretty cool. They're cheap and good for basic computing tasks like watching streaming video, checking Facebook, and emailing. But the operating system is essentially just the Chrome web browser, so you can't do heavy offline computing tasks. Plus, most of the hardware is underpowered.

But let's take that a step further. I think Apple's mobile OS, iOS, suffers from the same affliction as OS X. And the biggest reason why Apple remains the best in smartphones and tablets is a combination of superior hardware and the fact that developers still make their best apps for iOS over the alternatives.

Windows Phones are interesting, but most of the hardware (particularly from Nokia) is chunky and plasticky, with the exception of this phone from HTC. Plus, Windows Phone 8 only recently added key features like a virtual assistant and notifications center. Its app selection is a disaster.

Android is a pain to use on most devices. Google gives the OS away for free and lets manufacturers like Samsung and LG modify it how they see fit. That results in a lot of confusing layers on top of the "clean" version of Android.

I'm not even going to touch BlackBerry. You get the idea.

At the same time, iOS is riddled with its own problems. It got a shiny new look in 2013 with the launch of iOS 7, but it still functions about the same as it has for the last three or four years, a bunch of static pages to launch your apps.

Then there are all the crashes and the fact that a lot of people can't install iOS 8 because the file size is too large for devices with 16GB of storage. And let's not forget when Apple accidentally disabled cellular connections on tens of thousands of iPhones with the first update to iOS 8. A lot of people blame those problems on the fact that the business side of Apple puts too much pressure on engineers to pump out updates before they're ready.

That said, the biggest reason Apple remains on top in mobile is because it continues to play to its strength: hardware.

It makes the best computers. The best phones. The best tablets. Soon, it might make the best smartwatch.

All that great hardware coupled with unparalleled marketing keeps people buying the latest iThing. That in turn keeps developers making the best apps for the Apple ecosystem first, which makes the devices much more useful than the alternatives.

It's why I still think the iPhone is the best phone you can buy — great hardware and great apps.

No one else has matched that magic formula, but I think Android is getting close.

The newest version, called Lollipop, is really good. In a lot of ways, it's more advanced and feature-rich than iOS. But I haven't seen one Android device that can beat the iPhone from a hardware standpoint. And even though Android has a great app selection, the apps aren't as good as their iOS counterparts. Android is still an afterthought for most developers.

Apple's advantage in mobile right now is that the alternatives are still pretty bad by comparison, not because its products are immensely superior.