[英]How to submit an app version which runs on iPhone OS 3 and iPhone SDK 4?
I installed sdk 4 on my mac.我在我的 mac 上安装了 sdk 4。 I need to submit a version which runs on OS 3, and OS 4?
我需要提交在 OS 3 和 OS 4 上运行的版本吗? What are my choices?
我的选择是什么? can I install sdk3 again, and submit my app.
我可以再次安装 sdk3 并提交我的应用程序吗?
If I build with SDK4 is it going to run on devices with OS 3?如果我使用 SDK4 构建,它会在 OS 3 的设备上运行吗? I don't use any feature from OS 4.
我不使用 OS 4 的任何功能。
In PROJECT settings, set your BASE SDK to 4.0在 PROJECT 设置中,将您的BASE SDK设置为 4.0
In TARGET settings set your DEPLOY TARGET SDK to 3.0 (or 2.x or whatever you like.)在 TARGET 设置中,将您的DEPLOY TARGET SDK设置为 3.0(或 2.x 或任何您喜欢的)。
NOTE: If you use APIs that are above your lowest DEPLOY target ( ie , you use 4.0 APIs and you deploy to 3.x), you have to check for availability of that API.注意:如果您使用高于最低 DEPLOY 目标的 API(即,您使用 4.0 API 并部署到 3.x),您必须检查该 API 的可用性。 One way to do that is:
一种方法是:
// Code written in browser, not tested.
- (BOOL) classIsAvailablie: (NSString*) className
{
Class *theClass = NSClassFromString(className);
return (theClass != nil);
}
// ...
if ([self classIsAvailable: @"Some4.0OnlyClass"])
{
// ...
}
While you can set the Base SDK in the target build properties, the latest Xcode only comes with 3.2 annd 4.0 and the former is iPad only.虽然您可以在目标构建属性中设置 Base SDK,但最新的 Xcode 仅提供 3.2 和 4.0,而前者仅适用于 iPad。 Instead, you need to download an older version of Xcode (3.2.2) to develop for 3.x on the iPhone.
相反,您需要下载旧版本的 Xcode (3.2.2) 才能在 iPhone 上针对 3.x 进行开发。 You can install different sets of Xcode into different folders other than /Developer.
您可以将不同的 Xcode 集安装到 /Developer 以外的不同文件夹中。 The trick is finding an older version of Xcode.
诀窍是找到旧版本的 Xcode。 I save my copy (and I highly recommend you always keep 1 or 2 versions around), but they're not easily linked from the main devloper site.
我保存了我的副本(我强烈建议您始终保留 1 或 2 个版本),但它们不容易从主开发者站点链接。 You can go to http://connect.apple.com and find them under Downloads -> Developer Tools.
您可以访问http://connect.apple.com并在下载 -> 开发人员工具下找到它们。
It's kind of convoluted.有点纠结。 There really ought to be a way to install a base SDK into the latest Xcode release.
确实应该有一种方法可以将基本 SDK 安装到最新的 Xcode 版本中。 When Xcode 4 comes out, are we going to have to use the old interface to develop backwards compatible apps?
当 Xcode 4 出来时,我们是否将不得不使用旧界面来开发向后兼容的应用程序?
Details for developing for older firmware have also been covered in a previous thread .为旧固件开发的详细信息也已在之前的线程中进行了介绍。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.