Apple's effort to be more than a devices company is gaining momentum.

The company said on Tuesday that services revenue, which includes digital music, Apple Pay, cloud storage and apps, jumped 18 percent in the fiscal first quarter to $7.2 billion from $6.1 billion a year ago.

Analysts expected services revenue of $6.9 billion, according to data from FactSet.

While iPhones still represent the bulk of Apple's sales, CEO Tim Cook is doing his best to diversify into higher-margin software products as growth in smartphones slows. Subscriptions for services like Apple Music and iCloud produce predictable revenue, an attribute that Wall Street loves.

In the quarter, services accounted for 9.2 percent of total revenue.