Welcome to another Code Mill Minute installment! Or where I take a break from writing a long article and write a quick post about a small problem or annoyance that we Xamarin developers happen upon every day.

In this installment we’re going to take a look at a brand new “warning” message that pops up in iOS 10.1 about how our app may slow down an entire iPhone unless the developer improves the app’s compatibility. (Talk about your doom and gloom!)

[one_half]I came across this error message after I created a brand new Xamarin.Forms project. After File->New I normally move some directories around to get them the way I like and then update the NuGets. I then run the blank template app to make sure nothing weird happened … and boom! All of a sudden I get the screenshot on the right and iOS is telling me I have slow code! I didn’t even write anything yet!!

Seriously, could an error message be more foreboding?!? ## The Issue

The underlying issue is that Apple is trying to rid their app ecosystem of 32 bit applications. So although 64 bit applications had be submitted since Feb 1, 2015 – depending on how you had your build options set up, a lot of the time a 32 bit app would be included in the overall app bundle … so there would be one “version” of the app for older 32 bit iPhones and then another “version” for the newer 64 bit ones.

Evidently Apple’s not cool with that any longer.









The Fix

Easy enough – just have to tell Xamarin Studio (or Visual Studio) which architectures to support within the iOS project’s properties. To get there in Xamarin Studio, double click on the iOS project’s name (or right click and select Options). Then select iOS Build from the left hand menu.

From there, in the Supported Architectures dropdown select “x86_64” if you’re running on the simulator.

64-bit Simulator Settings
64-bit Simulator Settings

Or ARM64 if you’re running on device.

64-bit device settings
64-bit device settings

You’ll want to change those for both debug & release configurations – found at the top of the screen.

The whole settings screen - make sure to change the configurations at the top!
The whole settings screen – make sure to change the configurations at the top!

In Visual Studio, right click on the iOS project and then select properties from the context menu. From there select iOS Build on the resulting popup then the “Advanced” tab.

That’s It!

That’s all there is! Remember that there will not be a 32 bit “app” included in the bundle any longer – so your app won’t work on older hardware. But it’s Apple – that’s the way they want it any way! 🙂