(Reuters) - Apple Inc reported sharp growth in its services business on Tuesday and Chief Executive Tim Cook said trade tensions between the United States and China were easing, helping boost the company’s shares after hours even though iPhone sales dipped in the holiday shopping quarter for the first time.

Apple said sales for the current quarter would most likely be lower than Wall Street expected, a signal that it continues to face weak demand for the iPhone, especially in China, the world’s biggest smartphone market.

But investors focused on the company’s growing services, which include Apple Music and its App Store.

“The services number is good, and that is the growth engine going forward that people will continue to focus on,” said Ivan Feinseth, an analyst with Tigress Financial Partners.

Cook, who is in regular contact with U.S. President Donald Trump, said there were signs of a detente in trade tensions with China, which may have depressed sales of its phones.

“If you were to graph up trade tension it’s clearly less in January than it was in December,” Cook told Reuters in an interview. “I’m optimistic that the two countries will be able to work things out.”

The company’s shares rose 6 percent to $163.50 in after-hours trading. They had fallen more than 30 percent since November on concerns about weak iPhone sales and a general decline in high-tech stocks. Shares of iPhone suppliers including Micron Technology , Broadcom Inc and Skyworks Solutions rose more than 1 percent in extended trade after Apple’s report.

“It appears that the bears pressed way too hard on the negative bets and even this more negative report couldn’t drive the stock lower,” said Hal Eddins, chief economist for Apple shareholder Capital Investment Counsel.

SUBSCRIBERS UP

Apple said revenue from services, which investors are counting on to fuel growth, reached $10.8 billion, in line with Wall Street estimates. Services gross margin hit 63 percent, up from 58.3 percent a year ago. Analysts previously estimated the services gross margin could top 60 percent.

“They get more efficient as they get larger,” Cook told Reuters.

The company said it has 360 million subscribers to both its own and third-party services, and set a goal to expand that to 500 million by the end of 2020. It said it has 1.4 billion active devices, an increase of 100 million from last year, and that 900 million of those are iPhones.

Apple said it would start providing regular updates on the number of iPhones and overall devices in use - what is known in the tech industry as the installed base. The company stopped reporting unit sales of its iPhones the latest quarter.

FILE PHOTO - People use their phones outside an Apple store in Beijing, China January 7, 2019. REUTERS/Thomas Peter/File Photo

Apple counts both subscribers to its own services as well as Apple device users who subscribe to outside apps or services using Apple’s payment systems. Apple keeps up to 30 percent of the payments it handles.

Apple’s iPhone revenue declined 15 percent year-over-year to $51.9 billion. Cook said China’s economic weakness hurt iPhone sales there.

He said Apple is rethinking how it prices the iPhone outside the United States after largely setting the price in U.S. dollars, which made the phones more expensive in local currencies as the dollar strengthened.

In markets with currencies that weakened considerably against the dollar over the last year, iPhone price “increases were obviously more,” Cook told Reuters. “And so as we’ve gotten into January and assessed the macroeconomic condition in some of those markets, we’ve decided to go back to more commensurate with what our local prices were a year ago in hopes of helping the sales in those areas.”

OUTLOOK LARGELY BELOW WALL STREET

Apple said it expects revenue between $55 billion and $59 billion for the current quarter ending in March, largely below analysts’ average estimate of $58.83 billion, according to IBES data from Refinitiv.

For the quarter ending in December, the company’s busiest due to the holiday shopping season, Apple reported revenue of $84.3 billion, slightly above analysts’ average estimate of $84 billion. Apple warned in early January that sales would miss the targets it gave in November.

Earnings per share were $4.18, compared with Wall Street’s average estimate of $4.17, according to Refinitiv data.

Investors have been closely tracking the company’s share repurchase activity in hopes that it will help buoy the falling share price, which has knocked Apple off its throne as the world’s largest technology company with a market value of more than $1 trillion.

Apple said it bought back $8.2 billion worth of shares in the quarter ended in December, less than half the $19.4 billion it purchased in the quarter ended in September. Apple said its net cash position - cash minus its debt - was $130 billion, up from $123 billion in the previous quarter. Apple has publicly said it plans to draw its net cash position to zero.

Some investors were disappointed Apple did not take advantage of low prices over the last quarter to buy back more stock. Ross Gerber, chief executive of Santa Monica, California-based Apple shareholder Gerber Kawasaki, said that Cook “is very annoying in this way” and was “just playing the game so safely.”

“Tim just wants to be predictable and it seems to be working for now,” Gerber said.