There is a lot of misinformation and ignorance on how much Apple pays in taxes, especially in Ireland. I see snarky comments on HN all the time about Apple using tax havens and not paying their fair share of US taxes.
The most detailed and accurate article about Apple's tax liabilities that I have seen was published in Fortune[1]. It explains how multinationals actually are liable for US based corporate tax for ALL income all over the world, but there are two exemptions. One based around deferring tax payments and the other is for earnings from operations (not capital gains, etc) used to re-invest and grow the business.
[1] https://fortune.com/2017/10/31/trump-tax-reform-apple-multin...