I don't think they have. Until they can prove they've got a new product that can be as successful as the iPhone and iPad, I think they're riding a slow wave out of town.
The problem with Apple is that they went for the quick buck with their products. They were greedy, and tried to milk every dollar they could out of it in the short term. Now the well is drying up.
What could they have done differently? In 2007, maybe even as late as 2009, they had the best mobile OS. They could have pulled a Microsoft and licensed out their OS to other hardware manufacturers. Made money off the OS + all the software sales through their app store.
The money would have been slower in coming at first, but they could have basically blocked Google and MS from the market. That would have been playing the long game. They didn't do that, and now they have to hope they can come up with something new.