Tim Cook can't win.

Apple posted sales of more than $150 billion in the 2012 fiscal year — nearly as much as the two previous years combined — and record sales in two of the first three quarters of 2013, yet even friends of the company say it's on the decline.

The Apple CEO has tried to appease Wall Street by tying some of his compensation to Apple's stock performance and paying out the largest initial cash dividend of any U.S. company, but the stock has spent most of the year below the $500 mark, and investors are clamoring for Apple to return even more cash.

See also: How the Smartphone Market Has Changed Since the iPhone 5

Cook has repeatedly owned up to the company's mistakes during his tenure, only to be criticized by some in the media for apologizing — something Steve Jobs would never do. Except, of course, when Jobs did apologize.

Ever since Cook took over as permanent CEO exactly two years ago Saturday, he has frequently been judged in comparison to what people assumed his larger-than-life predecessor might have done, just as Apple has been judged against the many assumptions of what it might do next.

"If you look at the company's performance outside of the bubble of outsized expectations, they've been doing very well," says Charles Golvin, a principal analyst at Forrester Research, pointing to strong revenue and device sales. "His strong suit is managing the business, keeping costs down and managing the supply chain. All the stuff he did well [before taking over as permanent CEO], he has continued to do well."

Much of what Cook and Apple have been faulted for in recent months — declining profit margins and slower-than-expected revenue growth — would likely have happened regardless of who was CEO. Apple enjoyed a once-in-a-lifetime opportunity disrupting the smartphone market and reaping the vast majority of the profits through generous carrier subsidies. That period was bound to end; Cook just happened to be the guy in charge when it did.

AAPL data by YCharts

Don't Compare Tim Cook to Steve Jobs

Rather than compare Cook to Jobs — a standard by which virtually all CEOs would fall short — it makes more sense to judge Cook according to what one would expect of a successor to the founder and guiding force of a company.

Jeffrey Pfeffer, a professor at Stanford's graduate school of business, argues that there are two key criteria to assess someone in Cook's position at a technology company: Is the company retaining and attracting top employees and is it updating and expanding product offerings.

"You need to have great products and you need to have a great team, but you yourself don't need to be a rock star."

Every few months, a report comes out raising concerns about employees looking to jump ship at Apple. Yet survey data on the employee review site Glassdoor shows that both Cook and Apple continue to have strong approval ratings. There have been relatively few voluntary departures from Apple's top executive ranks, and it continues to bring in top talent from companies like Yves Saint Laurent, Adobe, Xbox and Nike.

What's more, Cook has shown a willingness to be decisive and shake up the top ranks by getting rid of unpopular executives like iOS chief Scott Forstall and retail chief John Browett in an effort to keep things running smoothly.

"He has kept most of the morale high and more importantly he did the kind of management changes that were needed," says Tim Bajarin, principal analyst with Creative Strategies. "He has shown pretty strong leadership in correcting problems quickly."

It's Pfeffer's second criteria — the product rollout — that may be seen as a more damning criticism of Cook's tenure. Under his leadership, Apple unveiled the iPad Mini and a major refresh of iOS, in addition to updating its existing product line. But it has yet to enter a new product category.

As Bajarin and others point out, however, Apple typically enters a new product category every three to five years. By that standard, one would expect Apple to release a major new product in the next year. The pace of innovation at Apple's competitors has sped up, but does that mean Apple should rush out a new product? To borrow a line from the critics, that's not something Steve Jobs would do.

"Steve did not believe in bringing a product to market 'til it was pretty much through the cycle of being tested, ready to manufacture and as close to perfect a launch as possible," Bajarin says. "So to push Apple to bring something new to market just for the investor's sake is crazy. You only get one chance to bring breakthrough products to market."

The Next Two Years Will Be Key

For Cook, the real test will be what happens during the next two years rather than the first two.

Golvin, the Forrester analyst, notes that it took roughly four years for Apple to begin its downfall following Jobs' first departure from Apple in the 1980s. It's unlikely that today's Apple, with more than $100 billion in the bank and hundreds of millions of customers, will find itself on the verge of bankruptcy in the way that the company did in the 1990s.

Instead, the measure of Apple's success under Cook will be whether it can successfully enter a new product category and keep the brand and existing products strong enough to continue attracting new customers and talented employees. For now, Cook deserves a little more credit for keeping the business running smoothly through what would have been an extremely messy transition of power at another company.

"When Walt Disney died, there was a three-year period where there was a lot of confusion, and only after that period did Disney get its bearing," Bajarin says. "Apple did not skip a beat."

Image: Kevork Djansezian/Getty