iOS 10.1模拟器显示"Application May Slow Down Your iPhone"
iOS 10.1 Simulator shows "Application May Slow Down Your iPhone"
当 运行首次从 Xamarin Studio 在 iOS 10.1 模拟器上运行应用程序时,我收到以下消息:
app name May Slow Down Your iPhone
The developer of this app needs to update it to improve its compatibility.
应用程序运行运行正常,第二次运行时没有出现消息。我怎样才能摆脱这条消息?
事实证明,该应用程序仅适用于 i386 架构,而不适用于较新的 x86_64 架构。在构建设置中更改此设置后(更改为 "i386 & x86_64",虽然我想 "x86_64" 也会有所帮助)它不再发生了。
参考:https://releases.xamarin.com/stable-release-cycle-8-service-release-0-w-xcode8-1-support/
与 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.
为 x86_64
编译
您需要为 x86_64 架构构建您的应用,无论您使用的是 Xcode 还是 Xamarin。特别是在使用 xcodebuild
从命令行构建时,设置 ONLY_ACTIVE_ARCH=NO
并确保不要使用 -arch i386
限制目标体系结构,因为您需要允许编译器为 x86_64 也是。
正在验证您的应用程序
要验证您的应用程序是为 x86_64 构建的,请解压缩您的 IPA 文件并找到二进制文件。 <filename>
和 <app>
分别是您的 IPA 和应用的名称:
unzip <filename>.ipa -d $TMPDIR/app
file $TMPDIR/app/Payload/<app>.app/<app>
如果您看到 Mach-O 64-bit executable x86_64
,则您的应用是为 x86_64 构建的。您可能还会看到您的应用程序是一个通用二进制文件,只要它包含一个 x86_64 切片就可以了:
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
为什么会出现这个警告
Apple 在 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."
更新:在Cycle 8 Service Release 2之前,iOS模拟器构建配置的默认构建架构不包括64位架构。
如何Resolve/Prevent这个警告
对于在 C8SR2 之前创建的 Xamarin 应用程序,您可以通过手动更改 iOS 构建架构来防止出现此错误消息。
构建架构引发警告
此 iOS 构建体系结构 不 包括 64 位体系结构
构建架构Resolving/Preventing警告
此 iOS 构建体系结构 包含 64 位体系结构
更新:新 Xamarin.iOS 应用程序
在 Xamarin 的最新稳定版 Cycle 8 Service Release 2 中,新 Xamarin.iOS 应用程序的默认构建架构是 x86_64 用于 iOS 模拟器构建。
即当您创建一个新应用程序(文件 -> 新建)时,默认构建架构是 x86_64 用于 iOS 模拟器构建。
当 运行首次从 Xamarin Studio 在 iOS 10.1 模拟器上运行应用程序时,我收到以下消息:
app name May Slow Down Your iPhone
The developer of this app needs to update it to improve its compatibility.
应用程序运行运行正常,第二次运行时没有出现消息。我怎样才能摆脱这条消息?
事实证明,该应用程序仅适用于 i386 架构,而不适用于较新的 x86_64 架构。在构建设置中更改此设置后(更改为 "i386 & x86_64",虽然我想 "x86_64" 也会有所帮助)它不再发生了。
参考:https://releases.xamarin.com/stable-release-cycle-8-service-release-0-w-xcode8-1-support/
与 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.
为 x86_64
编译您需要为 x86_64 架构构建您的应用,无论您使用的是 Xcode 还是 Xamarin。特别是在使用 xcodebuild
从命令行构建时,设置 ONLY_ACTIVE_ARCH=NO
并确保不要使用 -arch i386
限制目标体系结构,因为您需要允许编译器为 x86_64 也是。
正在验证您的应用程序
要验证您的应用程序是为 x86_64 构建的,请解压缩您的 IPA 文件并找到二进制文件。 <filename>
和 <app>
分别是您的 IPA 和应用的名称:
unzip <filename>.ipa -d $TMPDIR/app
file $TMPDIR/app/Payload/<app>.app/<app>
如果您看到 Mach-O 64-bit executable x86_64
,则您的应用是为 x86_64 构建的。您可能还会看到您的应用程序是一个通用二进制文件,只要它包含一个 x86_64 切片就可以了:
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
为什么会出现这个警告
Apple 在 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."
更新:在Cycle 8 Service Release 2之前,iOS模拟器构建配置的默认构建架构不包括64位架构。
如何Resolve/Prevent这个警告
对于在 C8SR2 之前创建的 Xamarin 应用程序,您可以通过手动更改 iOS 构建架构来防止出现此错误消息。
构建架构引发警告
此 iOS 构建体系结构 不 包括 64 位体系结构
构建架构Resolving/Preventing警告
此 iOS 构建体系结构 包含 64 位体系结构
更新:新 Xamarin.iOS 应用程序
在 Xamarin 的最新稳定版 Cycle 8 Service Release 2 中,新 Xamarin.iOS 应用程序的默认构建架构是 x86_64 用于 iOS 模拟器构建。 即当您创建一个新应用程序(文件 -> 新建)时,默认构建架构是 x86_64 用于 iOS 模拟器构建。