构建/测试通用 iPhone/iPad 应用程序
我有一个项目配置(我认为)来生成通用二进制文件。基础 SDK 设置为 3.2,部署目标设置为 3.1。目标设备系列是iPhone/iPad,架构是armv6 armv7。
我对这个通用二进制文件的实际工作原理有几个问题:
1)当我想提交应用程序二进制文件以供审核时,我应该将什么配置设置为构建目标?如果我将其设置为“设备 - 3.1”,我会收到一条警告,内容为“警告:使用包含 iPad('1,2') 的目标设备系列进行构建需要使用 3.2 或更高版本的 SDK 进行构建” 但是,如果我使用 SDK 3.2 进行构建,它仍然可以在 OS 3.1 的 iPhone 上运行吗? 设备和架构(arm6/arm7)的正确配置是什么?
2) 如何测试上述场景(使用 SDK 3.2 构建,但安装在运行 OS 3.1 的设备上)?如果我使用 SDK 3.2 进行构建,当我尝试将其安装在操作系统 3.1 的手机上时,我会收到一条错误消息,指出手机的操作系统未更新。
谢谢!
I have a project configured (I think) to produce Universal binaries. The base SDK is set to 3.2 and the Deployment Target is set to 3.1. Target Device Family is iPhone/iPad and the architecture is armv6 armv7.
I had a few questions about how this Universal binary thing really works:
1) When I want to submit an app binary for review, what configuration should I set as the build target? If I set it as "Device - 3.1" I get a warning which says "warning: building with Targeted Device Family" that includes iPad('1,2') requires building with the 3.2 or later SDK"
. However, if I build with SDK 3.2, will it still run on iPhones with OS 3.1?
What's the right configuration for device and architecture (arm6/arm7)?
2) How do I test the scenario above (built with SDK 3.2, but installed on a device running OS 3.1)? If I build with SDK 3.2, when I try to install it on a phone with OS 3.1, I get an error saying that the phone's OS isn't updated.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我们的第一个通用应用程序今天刚刚获得批准并在 App Store 中发布,因此以下是我们成功使用的设置:
架构
架构:优化(armv6、armv7)
基础 SDK:iPhone 设备 3.2
仅构建活动架构:未选中
有效架构:(空)
部署
目标设备系列:iPhone/iPad
iPhone 操作系统部署目标:iPhone OS 3.0
(您可以将其设置为任何 iPhone 3.x 操作系统,但我们希望尽可能以最旧的设备为目标。这必须是 3.0 或更高版本,2.x 对于通用应用程序无效。)
请确保您还检查了这些目标本身的设置(项目->编辑活动目标“AppName”);我上传到 iTunes Connect 时遇到的最初问题是因为目标本身的 iPhone OS 部署目标 仍然设置为 2.2.1。
Our first Universal App just got approved and released in the App Store today, so here are the settings we successfully used:
Architectures
Architectures: Optimized (armv6 armv7)
Base SDK: iPhone Device 3.2
Build Active Architecture Only: unchecked
Valid Architectures: (empty)
Deployment
Targeted Device Family: iPhone/iPad
iPhone OS Deployment Target: iPhone OS 3.0
(you can set this to any iPhone 3.x OS but we wanted to target the oldest devices possible. This must be 3.0 or above, 2.x is not valid for a Universal App.)
Make sure that you'd also checked these settings for the Target itself (Project->Edit Active Target "AppName"); my initial problems when uploading to iTunes Connect were because the iPhone OS Deployment Target for the Target itself was still set to 2.2.1.
因此,关键似乎是除了将“有效架构”设置设置为“armv6 armv7”之外,还将“架构”设置设置为“优化(arm6 arm7)”。
这使得它可以使用 3.2 SDK 进行编译,并在运行 3.1 的 iPhone 上运行
除了上述更改之外,我在问题中的设置似乎是配置应用程序以作为通用二进制文件提交所需的设置。我还没有做到,但我相当有信心。
如果我错了,请纠正我。
So, the key seems to be that the "Architectures" setting be set to "Optimized (arm6 arm7)" in addition to the "Valid Architectures" setting being set to "armv6 armv7".
This allows it to compile with the 3.2 SDK and run on an iPhone running 3.1
The settings I have in my question, in addition to this above change, seems to be what's needed to configure the app for submission as a universal binary. I haven't done it yet, but I'm fairly confident.
Please correct me if I'm wrong.