And Nokia *had* a smooth exist strategy planned out for Symbian
By the time the N8 came out, Nokia's dev tools supported easily writing applications that would work fine on Symbian devices like the N8 (and Symbian was still, at the time, the single most widely installed smartphone OS in the world) *and* on the new Harmattan Linux-based platform of the N9. It could, in fact, have been one of the smoothest ecosystem OS switchovers in computer history, had they kept to the plan.
And frankly, as someone who worked in phone retail at the time as a slacker job, I'm not sure Windows Phone even actually ever got as good of an app catalogue as the Qt-based apps for Maemo and Symbian; I had a Nokia N9 and easily had better apps available to me than the crappy catalogue available on the Windows Phones I was selling (frankly, Windows Phone was best considered just a nice touchscreen interface for a feature phone). Which is particularly shocking considering how Nokia entirely pulled the rug out from app developers and had essentially announced there was no future.
And that's not even to get into how Nokia had more Linux-based products in the pipeline that were then canceled to make way for Windows Phone . . . only, Windows Phone only supported an extremely limited set of SoCs and had to be developed for anew, abandoning the SoCs Nokia had been working with prior, and so Nokia found itself with giant gaps in its device roadmap.
Now, it's entirely possible that Nokia's smooth changeover strategy, where developers could easily target both their legacy platform and upcoming platform, may not have worked. And the N9 (which was wonderfully received at the time, and IMHO still feels a bit futuristic in construction and interface today; certainly the swipe-based navigation is almost infinitely better than Android's lacklustre new gesture-based navigation) may not have seen widespread adoption or the followup budget and mid-range devices may not have found traction either. But, it would have been far less of an uphill battle than Windows Phone was.