开发者

How can I build an application for iPhone OS 3.1.2 using the current Xcode?

I have an iPhone running the 3.1.2 firmware and would like to build applications for it. However, I can't find Xcode 3.2.1 with the iPhone OS 3.1.2 SDK at Apple's developer site.

How can I build an app开发者_高级运维lication using the current SDK and Xcode versions that will run on this older OS version?


Use the current tools and SDK. Set the "Base SDK" build setting to "Latest iOS" and set the "iOS Deployment Target" to whatever version you want to target, such as iOS 3.1.2.

The only gotcha here is that the compiler won't warn you if you use something from the SDK that was introduced after iOS 3.1.2, and if you do your app will likely crash. So, you'll want to check the docs for each method you use that you don't already know for certain is available in 3.1.2, and you should test your app thoroughly.


Unless there is some unmentioned reason you need the older version, you can use the latest Xcode and just target the build for the old iOS.


If you are a member of the Apple Developer Program (which you need to be in order to download any version of the Xcode and iOS SDK), you can download Xcode 3.2.6 w/ iOS SDK from the main 4.3 from the iOS Dev Center home page. Under the section for Xcode 4, there's a small line saying "Looking for Xcode 3? Download", which takes you to this download page.

Of course, that still requires you to develop using the 4.3 SDK, so you have to be carefull when targeting 3.1.2 devices.


You can purchase Xcode using the Mac-App-Store or by subscribing to the iPhone Developer Program ($99 per year).

Get the latest one (XCode with iOS SDK 4.3) and select 3.1.2 for the deployment iOS Version (under build-settings).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜