使用 Xcode 4.2 和 iOS 5 SDK 时是否可以针对较旧的 iOS 版本? [英] Is it possible to target older iOS versions when using Xcode 4.2 and iOS 5 SDK?

查看:36
本文介绍了使用 Xcode 4.2 和 iOS 5 SDK 时是否可以针对较旧的 iOS 版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近下载了带有 iOS 5 SDK 包的 Xcode 4.2,我立即注意到我无法使用带有 iOS 4.2.1 的 iPhone 3G 进行调试.我只能在安装了 iOS 5 的 iphone 4 上进行调试和测试.

I just recently downloaded the Xcode 4.2 with iOS 5 SDK package and I immediately noticed that I am unable to use my iPhone 3Gs with iOS 4.2.1 for debugging. I am only able to debug and test on my iphone 4 with iOS 5 installed.

对于我的任何运行低于 5.0 的 iOS 的设备,Xcode 只是说已完成 iPhone3GS 的运行"并且没有运行它.我将部署目标设置为 3.0,因为我没有在我的应用程序中使用任何高于 3.0 的功能,而且我希望能够针对 3.0 或更高版本的所有版本.我已安装所有配置文件并且是最新的.

For any of my devices running any iOS less than 5.0 Xcode just says "Finished running for iPhone3GS" and doesn't run it. I have my deployment target set to 3.0 because I am not using any features in my app above 3.0 and I want to be able to target all versions 3.0 or higher. I have all my provisioning profiles installed and up to date.

我已经退出并重新启动了 xcode,我已经多次清理构建.我曾尝试在架构构建设置中添加 armv6,但没有任何内容允许我在使用 ios 4.2.1 的旧手机上构建和运行我的应用程序.

I have quit and restarted xcode, I have cleaned the build multiple times. I have tried adding armv6 in the archtecture build settings, but nothing will allow me to build and run my app on my old phone with ios 4.2.1.

我的问题是,是否仍然可以使具有新 SDK 的应用程序适用于低于 5 的 iOS 版本?如果我无法在旧手机上安装我的应用,如何确保我的应用仍能在较低的 iOS 版本上运行?

My question is, is it possible to still make apps with the new SDK work for iOS versions lower than 5? How can I be sure that my app will still run on lower iOS versions if I am unable to install them on my old phone?

好吧,看起来 iOS SDK 5 默认放弃了对 armv6 的支持.您需要做的是在您的目标和项目的构建设置下的架构字段中添加 armv6.然后您的应用程序将能够在 iPhone 3G 设备上运行.答案可以在这里找到如何使用 iOS 构建 armv6 和 armv7 架构5

推荐答案

我在尝试让新创建的 Xcode 4.2 项目在 iPhone 3G 4.2.1 上运行时遇到了同样的问题.这是我如何让它运行.

I was having the same issue trying to get a newly created Xcode 4.2 project running on an iPhone 3G 4.2.1. Here is how I was able to get it to run.

1) 将目标的构建设置"==>架构"从标准(armv7)"更改为其他".添加 armv6 和 armv7.

1) Change the Target's "Build Settings" ==> "Architecture" from "Standard (armv7)" to "other". Add armv6 and armv7.

2) 将目标的构建设置"==>有效架构"更改为 armv6 和 armv7.

2) Change the Target's "Build Settings" ==> "Valid Architecture" to armv6 and armv7.

3) 将目标的构建设置"==>iOS 部署目标"更改为 iOS 4.2.

3) Change the Target's "Build Settings" ==> "iOS Deployment Target" to iOS 4.2.

4) 打开项目 *-Info.plist,去掉Required device capabilities"设置(注意需要 armv7)

4) Open the projects *-Info.plist, remove the setting "Required device capabilities" (note it required armv7)

顺便说一句,当我尝试通过组织者手动添加应用程序时我发现了这一点,但它报告了:

btw I figured this out when I tried to manually add the app via the organizer and it reported:

无法安装应用

位于/Users/.../TestsDebug.app 的应用程序的 Info.plist 指定Dev iPhone 3G 不满足的设备能力要求

The Info.plist for application at /Users/.../TestsDebug.app specifies device capability requirements, which are not met by Dev iPhone 3G

之后一切都应该可以工作了.谈论 PITA.

All should work after that. Talk about a PITA.

这篇关于使用 Xcode 4.2 和 iOS 5 SDK 时是否可以针对较旧的 iOS 版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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