Fixing Xamarin.iOS Apps for iOS 9
By Mike Irving - Published: 2/10/2015

Last month, as expected, the new iOS software version was released.

However, all was not well on iOS 9 with my Xamarin built apps. Indeed, many apps it would seem, are not compatible. Perhaps even ALL Xamarin.iOS Apps built between certain dates of Xamarin versions, or at least so seems true according to the Xamarin Bulletin about the issue.

Fortunately, for me at least, the majority of my iPhone and iPad apps are not Xamarin built, so there wasn't a huge panic!

Fixing things brought up the usual pain points of recreating expired Certificates, Provisioning Profiles, adding new Test Devices etc.

After those we're sorted, I made sure I had the latest version of Xcode 7 (a very big download, but necessary), and the latest Xamarin Studio updates.

My Projects loaded, and built ok.

However, some new things in iOS 9 do need attention.

If your app, Xamarin or not, performs any form of HTTP request, that is not across an secure connection, whether it be in Code, or via a UIWebView, it will be blocked. Check out Apple's "App Transport Security Technote".

The following info.plist entry will allow HTTP (non secure) data transport.*


With the launch of new Multitasking Features for iPad, and the larger iPad Pro, changes can be implemented to cope with varying app sizes.

If you do not implement these changes, you need to opt out, with the following entry in your info.plist file.*


Whilst your apps may build, and debug, just fine, the issues above will be flagged, if not catered for, when you upload your new builds to iTunes Connect. I also found further iTunes Connect upload rejections, centering around missing, or corrupt image files. All worth checking, and it is nice that iTC now checks and warns you when you upload binaries.

My updated apps were successfully published, after review by Apple.

* In Xamarin Studio, for now, you'll have to switch to Source view on your plist file to add these entries.


Update - 11th October 2015.

If your app code is of a certain age, you may find it works in the iOS Simulator, but that attempting to debug to an actual device fails.

This is likely to be as your apps to not support Unified API.

The Unified API supports both 64 bit and 32 bit architectures, but may require changes to your code.

To begin, from Xamarin Studio, select Migrate to Xamarin.iOS Unified API from the Project menu.

The process can be very quick, and seems pain free. You may be asked to allow your project to reload.

Upon clicking "Build" you may encounter problems.

The main build failures that I have encountered have been to do with new Native Types. These are new variable types that support both 32 bit or 64 bit underlying types.

You code may fail, as these new types are being returned. i.e. a method returns and nint and not an int. Either change your code to accept the new types, or perform a cast on the Native Type value.

I have had to change a few other things during migration, but nothing too painful. You should soon be back up and running, debugging, an able to submit Unified API compliant apps to iTunes Connect.

View Blog Entries...
Page: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11