iOS 64位兼容性 [英] iOS 64 bit compatibility

查看:94
本文介绍了iOS 64位兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天早上我收到了来自Apple的电子邮件,内容如下:

This morning I got an e-mail from Apple saying the following:


亲爱的开发者,

Dear Developer,

正如我们在10月份宣布的那样,从2015年2月1日开始,提交给App Store的新iOS应用程序
必须包含64位支持,并使用iOS 8 SDK构建
。从2015年6月1日开始,应用更新还需要
来遵循相同的要求。要在项目中启用64位,我们
建议使用默认的Xcode构建设置Standard
architecture来构建一个包含32位和64位
代码的单个二进制文件。

As we announced in October, beginning February 1, 2015 new iOS apps submitted to the App Store must include 64-bit support and be built with the iOS 8 SDK. Beginning June 1, 2015 app updates will also need to follow the same requirements. To enable 64-bit in your project, we recommend using the default Xcode build setting of "Standard architectures" to build a single binary with both 32-bit and 64-bit code.

如果您有任何疑问,请访问Apple Developer论坛。

If you have any questions, visit the Apple Developer Forums.

最好的问候,Apple开发者技术支持

Best regards, Apple Developer Technical Support

现在我有一个问题,您如何确保iOS应用程序与64位兼容?

Now I have a question, how do you ensure that an iOS app IS 64bit compatible?

我的构建设置如下所示:

My build settings look like this:

我的部署目标是iOS 6.0。

My Deployment target is iOS 6.0.

我只需要确认该应用程序是64位兼容的,我不熟悉iOS并且不久前接管了一个相当大的项目所以我宁愿问一下并且100%肯定。

I just need to confirm that the app is 64 bit compliant, I am all new to iOS and took over a fairly large project not long ago so I'd rather ask and be 100% sure.

为了让事情更清楚一点,您如何确保iOS应用程序与64位兼容?我知道您需要设置某些构建规则,例如图像中的构建规则,但我想知道有没有办法知道您的iOS应用程序是64位兼容的。 32位iOS应用程序可以在64位硬件上运行,所以我不相信检查iOS应用程序在设备上运行是否有帮助。

Just to make things a bit clearer, how do you ensure that an iOS app is 64bit compatible? I know you need to set certain build rules such as the one in the image, but I want to know is there any way of knowing that your iOS app is 64 bit compliant. 32 bit iOS apps can run on 64bit hardware so I don't believe checking if the iOS app runs on a device will help.

我相信你可以上传一个新版本,看看你是否收到了这条消息:但我希望在不上传新版本的情况下提供一个不错的选择。

I believe you could upload a new version and see if you get this message: But I was hoping for a nice option without uploading a new build.

谢谢!

推荐答案

根据您的设置,您应该在二进制文件中使用arm64和armv7。你不会得到armv7s,因为虽然它是一个有效的架构,它不包含在ARCHS_STANDARD中如果在Xcode 6上构建(另见)。

With the settings you have you should end up with arm64 and armv7 in your binary. You won't get armv7s because although it's a valid architecture, it's not included in ARCHS_STANDARD if building on Xcode 6 (See also).

仅仅因为它在64位设备上运行,并不意味着它具有64位支持。 64位设备可以运行32位应用程序。

Just because it runs on a 64 bit device, it doesn't mean that it has 64-bit support. 64-bit devices can run 32-bit apps.

要确定它是否包含arm64块,您需要找到该应用程序。转到Xcode首选项,然后选择Locations标记。派生数据行告诉您构建文件的位置。

To determine whether or not it contains an arm64 chunk, you need to find the application. Go to Xcode preferences, and select the Locations tag. The Derived Data line tells you where files are being built.

打开终端(Finder-> Applications-> Utilities-> Terminal)并使用'cd'命令转到该位置。在我的例子中,我的项目存储在〜/ MyProject

Open up a Terminal (Finder->Applications->Utilities->Terminal) and go to that location using the 'cd' command. In my case, my project is stored in ~/MyProject

$ cd ~/MyProject
$ cd build
$ find . -name MyTarget
./build/MyTarget
./build/MyTarget/Build/Products/Debug-iphoneos/MyTarget.app/CoreControl
./build/MyTarget/Build/Products/Debug-iphoneos/MyTarget.app.dSYM/Contents/Resources/DWARF/CoreControl

现在我们知道存储二进制文件(这是第二个结果),我们可以检查它以查看它包含的体系结构:

Now we know where the binary is stored (it's the second result), we can check it to see what architectures it contains:

$ dwarfdump ./build/MyTarget/Build/Products/Debug-iphoneos/MyTarget.app/MyTarget
----------------------------------------------------------------------
 File: ./build/MyTarget/Build/Products/Debug-iphoneos/MyTarget.app/MyTarget (armv7)
----------------------------------------------------------------------
.debug_info contents:
< EMPTY >

在我的情况下,我只有arm7,而不是arm64。

In my case, I only have arm7 built, not arm64.

这篇关于iOS 64位兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆