Apple is spending more than ever on R&D to fulfill the ‘Tim Cook doctrine’