Xcode 5 和 iOS 7:架构和有效架构 [英] Xcode 5 and iOS 7: Architecture and Valid architectures

查看:39
本文介绍了Xcode 5 和 iOS 7:架构和有效架构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 Xcode 5 中开始新项目.我想使用 iOS SDK 7 开发应用程序,但部署目标为 iOS 5.0.一旦我在 Xcode 中创建新项目并尝试将部署目标更改为 5.0,我就会收到以下消息:

I'm starting new project in Xcode 5. I want to develop application using iOS SDK 7 but with deployment target iOS 5.0. As soon as I create new project in Xcode and try to change deployment target to 5.0, I've got this message:

Applications including an arm64 slice are not compatible with versions of iOS
prior to 6.0
Adjust your Architectures build setting to not include arm64 in order to deploy
to releases prior to iOS 6.0.

因此将架构更改为Standard(没有 64 位).我编译、运行,但我不太明白刚刚发生了什么.

Xcode 项目构建设置中的 ArchitecturesValid Architectures 设置之间有什么区别?
如果我将 Architectures 设置为排除 64 位,当我在 64 位 iPhone 或 iOS 模拟器上运行我的应用程序时会发生什么(我知道它可以工作,我只是好奇下面会发生什么)?
你能解释一下新的 64 位架构的大混乱吗?

So changed architectures to Standard (no 64bit). I compiles, runs but I do not really understand what just happend.

What's the difference between Architectures and Valid architectures settings in Xcode project Build Settings?
If I set Architectures to exclude 64-bit what happens when I run my app on 64-bit iPhone or iOS Simulator (I know it works, I'm just curious what hapens underneath)?
Can you explain big mess with new 64-bit architecture?

推荐答案

将构建设置中的架构设置为Standard architectures(armv7,armv7s)

Set the architecture in build setting to Standard architectures(armv7,armv7s)

iPhone 5S 采用 A7 64 位处理器.来自 apple 文档

iPhone 5S is powered by A7 64bit processor. From apple docs

Xcode 可以构建包含 32 位和 64 位二进制文​​件的应用程序.此组合二进制文件要求最低部署目标为 iOS 7 或更高版本.

Xcode can build your app with both 32-bit and 64-bit binaries included. This combined binary requires a minimum deployment target of iOS 7 or later.

注意:Xcode 的未来版本将允许您创建一个应用程序,该应用程序在 iOS 6 及更高版本上支持 32 位运行时,并在 iOS 7 上支持 64 位运行时.

Note: A future version of Xcode will let you create a single app that supports the 32-bit runtime on iOS 6 and later, and that supports the 64-bit runtime on iOS 7.

从文档中我理解的是

  • Xcode 可以为单个应用程序创建 64 位 32 位二进制文​​件,但部署目标应该是 iOS7.他们说将来会iOS 6.0
  • 32 位二进制文​​件可以在 iPhone 5S(64 位处理器)中正常工作.

更新(Xcode 5.0.1)
在 Xcode 5.0.1 中,他们添加了为 iOS 5.1.1 以后创建 64 位二进制文​​件的支持.

Update (Xcode 5.0.1)
In Xcode 5.0.1 they added the support to create 64 bit binary for iOS 5.1.1 onwards.

Xcode 5.0.1 可以构建包含 32 位和 64 位二进制文​​件的应用程序.此组合二进制文件要求最低部署目标为 iOS 5.1.1 或更高版本.64 位二进制文​​件仅在运行 iOS 7.0.3 及更高版本的 64 位设备上运行.

Xcode 5.0.1 can build your app with both 32-bit and 64-bit binaries included. This combined binary requires a minimum deployment target of iOS 5.1.1 or later. The 64-bit binary runs only on 64-bit devices running iOS 7.0.3 and later.

更新(Xcode 5.1)
Xcode 5.1 在架构部分进行了重大更改.这个答案将为您提供后续服务.检查这个

Update (Xcode 5.1)
Xcode 5.1 made significant change in the architecture section. This answer will be a followup for you. Check this

这篇关于Xcode 5 和 iOS 7:架构和有效架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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