Apple (NASDAQ:AAPL) delivered a blockbuster performance in 2017. The tech titan generated tens of billions of dollars in profits and hundreds of billions in gains for investors.

There were many highlights to the year, but here are three ways Apple absolutely crushed it in 2017.

A bat crushing a baseball

Image source: Getty Images.

Surging services revenue

Apple's iPhone business gets most of investors' attention, and rightfully so; the iconic device accounts for more than 60% of Apple's total revenue. The segment had another terrific year in 2017, with the iPhone 8 and iPhone X enjoying stellar reviews and strong early sales.

But there's another important, yet often overlooked, segment that will be key to Apple's growth in the years ahead. Apple's services business -- which includes the App Store, iTunes, Apple Pay, Apple Music, and more -- was one of Apple's fastest-growing sources of revenue last year.

Services revenue jumped 23% year over year to $30 billion in fiscal 2017, fueled by strong App Store sales. iOS developers earned $26.5 billion in 2017 -- representing a year-over-year increase of more than 30% -- which puts Apple's cut at about $11 billion based on its revenue split.

The year ended on a strong note, as Apple enjoyed a record-breaking holiday season with customers spending $890 million on App Store purchases during the week of Christmas. 2018 is also off to a fast start, with the App Store generating $300 million in sales on New Year's Day alone -- a single-day record.

Better still, with the rapidly growing App Store and Apple Music leading the way, Apple is well on its way to achieving its long-term goal of $50 billion in services revenue by 2020.

Massive cash production

Apple's surging services business, combined with solid growth in its core iPhone, iPad, and Mac product lines, helped drive its 2017 full-year revenue higher by 6% to a staggering $229 billion. These high-margin sales resulted in more than $48 billion in net income. Even better, Apple's free cash flow topped $50 billion.

Apple's incredible cash-generating abilities have helped it amass a war chest of $269 billion in cash on its fortress-like balance sheet. In turn, the company has returned more than $233 billion to investors via dividends and share repurchases, and it plans to up that figure to $300 billion by 2019.

Shareholder wealth creation

Including dividends, Apple delivered to investors a whopping 49% total return in 2017. That's mind-boggling for a business that was already a $600 billion behemoth when it entered 2017, and whose market cap now tops $900 billion.

Moreover, with multiple growth drivers set to power its results in 2018, Apple appears poised to become the world's first $1 trillion company in the year ahead.

Joe Tenebruso has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Apple. The Motley Fool has the following options: long January 2020 $150 calls on Apple and short January 2020 $155 calls on Apple. The Motley Fool has a disclosure policy.