Apple CEO Tim Cook delivers the keynote address during the 2019 Apple Worldwide Developer Conference (WWDC) on June 03, 2019 in San Jose, California. Justin Sullivan | Getty Images

Apple spent $4.2 billion on research and development in the quarter ending in June, the highest quarterly amount it has ever spent on research and development, according to its quarterly earnings statement. Apple's R&D bill came out to 7.9% of its total revenue, the highest percentage since 2003, when Apple was still focusing on iPods and Macs. Apple is on pace to spend over $16 billion on research and development in 2019. The increased spending on R&D comes as Apple's cash cow, the iPhone, has seen sales slump. iPhone revenue last quarter was down 12% from the same period last year. So Apple is investing in core technologies that may power devices that haven't been built — but open-ended technology development and exploration comes at a cost.

CNBC

Historically, Apple has been a laggard behind other top technology companies when it comes to spending as a percentage of its sales, and it still is. In the June quarter, Microsoft spent 13.4% of its revenue on R&D, and Google spent 15.7% of its sales on R&D. Analysts have noticed Apple's rising R&D costs. On its Q3 earnings call, an analyst asked Apple CFO Luca Maestri if the company expects to continue to spend an increasing amount on investment, and he said that the trend would continue. "We want to improve the user experience and differentiate our products and services in the marketplace. So, we will continue to do that," Maestri said. "There are some types of investments, of course, that are very strategic for us and they will have long-term implications." Maestri brought up Apple's recent $1 billion purchase of Intel's modem division, which came with 2,000 employees, its largest acquisition ever from an employee integration standpoint. (It spent $3 billion to buy Beats in 2014, but that company had fewer employees.) "You've seen the announcement that we made around the Intel acquisition. Very important strategically for us. It requires upfront investment, of course," Maestri continued. Apple declined to comment beyond its financial statements and Maestri's comments.

The Tim Cook doctrine requires money