Apple pays the majority of taxes to US. They report US income and pay taxes for that to US. Ireland is involved only so far as EU income. So if your American app is sold to European users, the income is recognized as EU, and reported to Ireland.
https://fortune.com/2017/10/31/trump-tax-reform-apple-multin...
There are other possible criticisms on corporate tax and Apple, but this isn't a valid one.