upgrade

Oops – How to fix when you’ve upgraded Visual Studio for Mac / Xamarin iOS and now being forced to upgrade Xcode and to Catalina ????

What went wrong?

So, here’s the scenario, fire up Visual Studio for the Mac, not enough caffeine in the system, an ‘updates’ box pop up,  a Xamarin iOS update amongst many, you click ok, then instant regret ????. Why you may ask, an update is good? No? Well not here.  Like many developers I have a reluctance to go to Mac OS Catalina (a lot of changes, and too many issues) and am quite happy in the stable, stable land of Mojave. So what have I done?

In essence I’ve upgraded the version of Xamarin iOS from somewhere in the 12.x range to 13.16. I knew the second I’d upgraded it had gone wrong, but opening a Xamarin iOS / Forms project instantly told me.  My selected version of Xamarin iOS required an Xcode upgrade to 11.x.  Off to the App Store I go, just to confirm, and of course;

UntitledImage

Mojave of course is 10.14, Catalina 10.15, so I have to upgrade right, and lose a day of productivity (or more) with it? Wrong.

The fix

So, the solution, first off come out of Visual Studio for Mac, and then drop to Terminal app.  Execute these commands line by line (entering your admin password when required);

rm -rf ~/Library/MonoTouch

sudo rm -rf /Library/Frameworks/Xamarin.iOS.framework

sudo rm -rf /Developer/MonoTouch

sudo pkgutil --forget com.xamarin.monotouch.pkg

sudo pkgutil --forget com.xamarin.xamarin-ios-build-host.pkg

sudo pkgutil --forget com.xamarin.xamarin.ios.pkg

In the meantime I had downloaded the latest 12.16 release of Xamarin iOS.  For me this is https://dl.xamarin.com/Mo… however your requirements may vary.  Should be as simple as tweaking the download url to suit, you can find 12.x version numbers over here on the Xamarin iOS 12 release notes page.

Once downloaded simply double click and install the package.  Then fire up Visual Studio for Mac and fingers crossed, all worked fine for me.

About me

Andy Flisher is a Mobile App Developer based in the North East of England with over 20 years software development experience. He is available for hire and specialises in cross platform mobile app development, web applications, desktop software, bespoke cloud architecture solutions and providing outsourced project management services.