When running an app for the first time from Xamarin Studio on an iOS 10.1 Simulator, I got the following message:
app name May Slow Down Your iPhone
The developer of this app needs to update it to improve its compatibility.
The app runs normally, and the message does not appear when I run it for the second time. How can I get rid of this message?
It turned out that the app was only built for the i386 architecture and not for the newer x86_64 one. After changing this in the build settings (to "i386 & x86_64", though I suppose "x86_64" would help as well) it didn't occur anymore.
Ref: https://releases.xamarin.com/stable-release-cycle-8-service-release-0-w-xcode8-1-support/
Remaining higher visibility known issues related to Xcode 8.1
[Xamarin Studio] – 45861 – “May Slow Down Your iPhone … The developer of this app needs to update it to improve its compatibility.” because of default “i386” supported architecture setting in the iPhoneSimulator configuration on new projects
Fix: Change Project options > iOS Build > Supported architectures to x86_64 (instead of the default i386) for the iPhoneSimulator configuration.
Why This Warning Appears
Apple added this warning in iOS 10.1. This article succinctly defines the warning:
"In a bid to push developers to update their apps to 64-bit frameworks, Apple has introduced a new warning message with iOS 10.1. The message reads: “[App Name] may slow down your iPhone”, with a slug, “The developer of this app needs to update it to improve its compatibility.” This message only appears if you're running a 32-bit app.
This won’t affect a vast majority of iOS users as Apple stopped accepting updates to 32-bit apps in June 2015."
Update: Before Cycle 8 Service Release 2, the default Build Architecture for the iOS Simulator Build Configuration did not include the 64-bit architecture.
How To Resolve/Prevent This Warning
For Xamarin apps that were created before C8SR2, you can prevent this error message by manually changing the iOS Build Architecture.
Build Architecture Causing Warning
This iOS Build Architecture does not include the 64-bit Architecture
Build Architecture Resolving/Preventing Warning
This iOS Build Architecture does include the 64-bit Architecture
Update: New Xamarin.iOS Apps
In the latest Stable version of Xamarin, Cycle 8 Service Release 2, the default Build Architecture for new Xamarin.iOS apps is x86_64 for iOS Simulator builds.
i.e. When you create a new app (File -> New), the default Build Architecture is x86_64 for iOS Simulator builds.
Compiling for x86_64
You need to build your app for the x86_64 architecture, whether you're using Xcode or Xamarin. In particular when building from the command line with xcodebuild
, set ONLY_ACTIVE_ARCH=NO
and be sure not to constrain the target architectures with -arch i386
because you need to allow the compiler to build for x86_64 too.
Verifying your app
To verify that your app is built for x86_64, unzip your IPA file and find the binary. <filename>
and <app>
are the names of your IPA and app respectively:
unzip <filename>.ipa -d $TMPDIR/app
file $TMPDIR/app/Payload/<app>.app/<app>
If you see Mach-O 64-bit executable x86_64
, your app is built for x86_64. You might also see that your app is a universal binary, which is OK too as long as it contains an x86_64 slice:
Mach-O universal binary with 2 architectures
(for architecture x86_64): Mach-O 64-bit executable x86_64
(for architecture i386): Mach-O executable i386