Apple (AAPL -0.57%) recently reported strong second-quarter results, but its third quarter might not be so great. Speaking on the company's earnings call on April 29, Chief Financial Officer Luca Maestri said supply constraints will have a bigger impact this quarter versus last quarter. Additionally, foreign-exchange headwinds will challenge revenue growth, and the company will suspend sales in Russia for the full quarter.

He said services revenue could decelerate quarter over quarter, but he still expects the segment to grow at a double-digit percentage rate. In the face of headwinds for the company's device sales, the services segment has never been more important to Apple.

A person holding an iPhone.

Image source: Getty Images.

A look at the second quarter

One thing that caught my eye in Apple's second-quarter financial statements was the continued expansion of gross margin for the services business. Gross margin was about 72.5% in the first half of the year. That's up from about 69.3% during the same period last year.

In fact, Apple's second-quarter gross profit from services grew more than Apple's total operating income. That's not to say services are the only thing driving income growth at Apple -- device sales also grew and gross margin expanded -- but it's certainly having an outsize impact on Apple's bottom line.

Maestri pointed to several records driving that services revenue growth and margin expansion. Apple set new records for App Store, Music, cloud services, and AppleCare sales. It also set second-quarter records for video, advertising, and payment services.

An important factor in that "advertising" piece is the traffic acquisition costs Google pays to Apple for making it the default search engine in Safari. Alphabet (GOOG 0.37%) (GOOGL 0.35%) reported a $2.3 billion year-over-year increase in traffic acquisition costs last quarter. That number typically increases sequentially throughout the year, peaking in the fourth quarter, but then subsiding in the following year's first quarter. Apple should see its payments from Google drive its advertising growth once again this year, but it's something for investors to pay attention to.

The strong services business can stabilize the entire operation

More and more of Apple's services business comes from subscriptions. The company counted 825 million subscriptions across its own services and through the App Store as of the end of the second quarter. That's up 165 million from 12 months ago. Those subscriptions create consistent revenue month after month, quarter after quarter, providing a stabilizing force for Apple's revenue and profits.

And App Store sales growth accelerated in April and could continue through the rest of the quarter, Morgan Stanley analyst Katy Huberty told Barrons. She thinks the App Store, one of Apple's more-mature services, could grow 15% year over year in the third quarter.

Advertising revenue should continue growing. Google's core search business is seeing strength this quarter with reinvigorated consumer interest in highly profitable verticals like travel and entertainment. Those trends should also benefit Apple's own advertising operations and could impact its deal with Google.

So, while Maestri expects supply chain issues to result in lost sales of $4 billion to $8 billion this quarter, the services business could help offset that lost revenue. And since Apple is also expanding its already high gross margin on services, it should be able to keep growing its operating and net income despite the pressure on device sales.

Apple has spent years building its services business into the significant contributing factor that it is today. And with the current macroeconomic environment impacting overall results, it's a good thing CEO Tim Cook decided to make services a major focus for the tech company.