Stay ahead of the game? Apple is the only one IN the game.
Don't kid yourself by looking at marketshare numbers, Apple is the only player in the game they more or less invented when it comes to smartphones. Saying Android outsells iOS is like saying Ford sells more cars than Chevy sells Corvettes. "Android devices" includes the little pink Barbie smartphone at Toys R Us. And Apple is the only one making real money in this arena anyway, so I suspect they couldn't care less about where they fall in line with their competitors.
As far as computers, again, Apple isn't in the "cheap as we can sell it and make it up with volume" market. According to all the reports released in the last week from manufacturers, Apple is the only company who makes/sells computers that is actually making money by selling computers. It's almost comical.
I don't think Apple gives a single donkey turd about their competition. It's a nice thought, but I suspect they only truly compete with themselves anymore. They're too busy to invest the time it requires to do things that would actually mess with a competitor. I mean, we're not talking about wrapping Michael Dell's office in tinfoil here. Everything Apple does, for whatever reason, is expensive as hell and has an impact on their bottom line—so it has to be as good as they can make it.