Shares of Apple hit a record high Wednesday, bringing its market cap within $10 billion of the coveted $1 trillion mark. The jump came after the company posted better-than-expected earnings for its fiscal third quarter and forecast revenue for the current period would be higher than analyst expectations.

While the tech giant sold fewer of its flagship iPhones than expectedー41.3 million units versus estimates for 41.8 millionーthe average selling price of $724 was above forecasts.

In a conference call after the report, CEO Tim Cook said, “We’re expanding our reach into emerging markets and seeing strong double-digit growth in revenue, and we’re making great progress toward our goal of significantly expanding our services business."

Some analysts were concerned there would be a drop off in demand for the company's highest-priced iPhone X, which sports a starting price tag of $999. The three months ending in July are often considered the most "boring" quarter for Apple, with the holiday season behind it and many customers waiting for the newest set of offerings, usually unveiled in the fall. But in an interview with Reuters, Apple CFO Luca Maestri said the iPhone X was the company's best-selling model during the quarter.

Another bright point for Appleーrevenues from its services business, which includes its App Store, Apple Music, and iCloud. Sales in that sector rose 31 percent to $9.5 billion.

The company didn't report a major impact from Chinese tariffs in the quarter, but Cook said the company would continue to monitor the situation.

Overall, revenues came in at $53.3 billion for the quarter. The company said sales for its fiscal fourth quarter, which would include early sales of its latest devices, would be between $60 and $62 billion.