Apple's (AAPL -1.22%) stock has soared 38% over the past 12 months. But what has investors so excited? After all, revenue fell 2% year over year in Apple's fiscal 2019, which ended on Sept. 28, 2019. On the surface, it might seem like Apple shareholders should be disappointed in this performance.

Investors' optimism for Apple stock comes down to the ongoing transformation of the tech giant's business. In fiscal 2019, Apple became less dependent on unpredictable hardware revenue as services revenue jumped. Further, fast-growing revenue from Apple's "wearables, accessories, and home" segment meant the tech company's hardware revenue is becoming more diversified, helping further mitigate some of Apple's reliance on the iPhone.

Here's a closer look at Apple's recently ended fiscal 2019.

Apple CEO Tim Cook during the company's 2019 WWDC keynote presentation

Apple CEO Tim Cook. Image source: Apple.

1. iPhone revenue declined 14%

The biggest headwind for Apple during fiscal 2019 was a 14% year-over-year decline in iPhone revenue. Fortunately, Apple saw growth in the rest of its segments during the year, helping offset some of the negative impact from this business. But the pullback in this key segment was still concerning.

The iPhone XS, XS Max, and XR simply failed to live up to tough comparisons in fiscal 2018, when iPhone revenue jumped 18% on the success of the iPhone X.

However, improving iPhone sales trends as the year progressed helped temper concerns about the important business; perhaps iPhone revenue declines in fiscal 2020 will be more moderate.

2. Total revenue fell 2%

Thanks to broad-based growth across the rest of Apple's segments, with particularly strong growth in services and wearables, home, and accessories, Apple's decline in total revenue wasn't nearly as bad as its pullback in iPhone revenue.

Importantly, Apple actually returned to slight revenue growth in the second half of the year, with fiscal Q3 revenue rising 1% year over year and fiscal Q4 revenue accelerating to 2% growth.

3. Services revenue jumped 16%

Apple's second largest segment, services, continued to see impressive growth. Total services revenue increased 16% year over year to $46.3 billion, accounting for 18% of total revenue, up from 15% of revenue in fiscal 2018.

With more than $46 billion in annual services revenue, Apple's services business is now the size of a Fortune 70 company.

4. Paid subscriptions increased to 450 million

One key driver of Apple's services business has been its growth in paid subscriptions. Total paid subscriptions, including to both its own apps and third-party apps, increased 36% year over year to 450 million.

5. Wearables, accessories, and home revenue soared 41%

Apple's wearables, accessories, and home segment saw faster growth than any other segment. Total revenue jumped 41% year over year to $24.5 billion. The segment is now notably larger than Apple's iPad segment and it is on pace to surpass Mac revenue in the coming quarters.

6. Earnings per share was flat

Finally, there's Apple's earnings per share of $11.89 -- about in line with the $11.91 it reported in fiscal 2018. While this flat performance from Apple's bottom line was disappointing, per-share profitability returned to growth in fiscal Q4, rising 4% year over year.

With Apple's fast-growing services and wearables businesses accounting for a larger share of revenue and showing no signs of slowing down, it's no surprise that analysts are betting revenue and earnings will increase meaningfully in fiscal 2020. Currently, analysts expect revenue and earnings per share to increase about 6% and 9% year over year in fiscal 2020, respectively.