I've never been an Apple fan, but I can't fault them for using available legal tax strategies. Apple's problem is the same as Microsoft used to have: they're under the delusion that if they mind their own business, that Congress and regulators will leave them alone. The truth is that they have a target on their back. Sadly,they need to spend money and buy legislators. That's the way it is in today's world.
As for market share in smart phones, their dominance was bound to lessen in time. Bringing Steve Jobs back from the dead wouldn't change that.
US tax law needs to change, see the current 'Economist' (not exactly a liberal rag) pp.65-66 if you need to know why. Example:
USA law says a corporation's residency is based on where a firm is incorporated, Irish law says it is where it is managed or otherwise controlled. This lets Apple claim it is a resident of nowhere for tax purposes.
Let's see how many lobbyists and lawmakers Apple buys with some of the $30 billion profit made between 2009-2012 by Apple Operations International, incorporated and based in Cork, Ireland, which in turn is parent to the group's international sales arm. The company is managed from the US (board meetings are held here). No tax was paid on that $30,000,000,000 anywhere.
Indeed they have a target on their back and rightfully so.