(Kevin Frayer/Getty Images)

Apple on Tuesday said its revenue fell 5 percent in the first quarter, compared with $88.3 billion a year earlier, as chief executive Tim Cook admitted that people are holding on to their iPhones longer.

Revenue from the maker of iPhones came in at $84.31 billion, slightly higher than the company estimated earlier this month, when it warned that sales would fall to about $84 billion. At the time, Cook cited a slowdown in China’s economy as well as President Trump’s trade war for weakening iPhone demand. It was Apple’s first warning in more than 15 years.

Apple’s stock jumped more than 4 percent in after-hours trading.

In its results, Apple said net sales of iPhones were down by more than $9 billion compared with the same quarter last year. Cook conceded that many Apple users are “holding on to their older iPhones a bit longer than in the past,” which contributed to lower iPhone demand. But he also pointed to shifts in foreign exchange values that made Apple products more expensive in certain markets.

Consumers are holding on to their smartphones for three years or longer, The Washington Post reported last month. But higher selling prices -- with some high-end models costing over $1,000 -- have been able to compensate for fewer new phones sold.

Sales increased in other categories such as services, wearables and tablets. Altogether, Apple reported net income of $19.97 billion for the quarter compared to $20.01 billion in the same period a year earlier. The popularity of Apple’s smartwatch has driven significant growth in the company’s wearables segment, according to the company.

“Our wearables business is approaching the size of a Fortune 200 company,” said chief financial officer Luca Maestri.

While Cook acknowledged the continuing economic slowdown in China, he said it is “not in our DNA to stand around waiting for macroeconomic conditions to improve." One effort Apple is undertaking in response, Cook added, is to encourage customers to trade in their old devices and receive credit toward purchasing new phones. Apple offered deep discounts on its iPhone XR around the holidays, for instance, for people trading in recent devices.

More than two-thirds of Apple customers in China who bought an iPad or a Mac last quarter were first-time purchasers of those devices, Cook said.

Apple also said it is expecting lower revenues next quarter — between $55 billion and $59 billion — compared with the same time last year, when it reported revenues of $61.1 billion. The company attributed the lower guidance to the same foreign exchange and macroeconomic factors it cited for the quarter that ended in December.

Shareholders were already reeling from Apple’s acknowledgement this week of a major flaw in its mobile operating system that allowed attackers to eavesdrop on the recipient of FaceTime calls. Apple told users it is aware of the issue and that it plans to release a software update this week.

Tuesday marked the first of Apple’s earnings reports in which the company did not report the number of iPhones it sold in the quarter. But the company did say that the total number of iPhones active worldwide now stands at 900 million — a positive sign for Apple as it seeks to convert many of its customers into users of its services such as Apple Pay and Apple Music.

Apple last year became the first trillion-dollar company, riding a strong earnings report and the enduring popularity of its iPhones. But its stock price tumbled in the fall amid macroeconomic concerns that brought down the entire tech sector. Its valuation before Apple released its earnings Tuesday afternoon stood at about $730 billion, behind Amazon, Google parent Alphabet and Microsoft. (Amazon chief executive Jeffrey P. Bezos owns The Washington Post.)