Code Mill Minute: Stopping the “ThisApp May Slow Down Your iPhone” Message

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!)

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!!

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.

Seriously, could an error message be more foreboding?!?

Seriously, could an error message be more foreboding?!?

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! 🙂

Matthew Soucoup on EmailMatthew Soucoup on GithubMatthew Soucoup on LinkedinMatthew Soucoup on Twitter
Matthew Soucoup
Matthew Soucoup
Matthew is a Xamarin MVP and Certified Xamarin Developer from Madison, WI. He started Code Mill Technologies and is the founder of the Madison Mobile .Net Developer's Group. 

Matt regularly speaks on .Net and Xamarin development at user groups, code camps and conferences throughout the nation, including Xamarin Evolve, That Conference, Prairie.Code(), MKEdotNET, St. Louis Days of .Net, and CodeMash.

When he's not developing cross platform apps, writing blog posts, or creating the next great talk, Matt enjoys brewing beer with jalapeños from his garden and playing 80s tunes on the piano.
%d bloggers like this: