How do I use the ios 4.2 base sdk using Xcode 4.2?

孤者浪人 提交于 2019-12-05 10:53:51

Xcode 4.2 comes with device support for iOS 4.2+ already installed. You don't want to change the base SDK, you need to change the deployment target. By default, the deployment target for a new project in Xcode 4.2 is set to iOS 5.0. You can change that either on the project settings summary screen or in the project settings configuration settings (it's fairly obvious on the summary screen, and just search for 'deployment target' on the full settings screen). Make sure you are using the full settings, and not just basic settings.

Also, make sure you haven't enabled any iOS 5+ only settings like Storyboards. Your project won't load on iOS 4.2 if those are enabled.

EDIT: Based on your comment, I think you may be using a 1G/2G iPod Touch? If so, it's the new default architecture. Since iOS 5 only runs on armv7 devices, the new default project only has armv7 as a valid architecture. Go to the project settings and add armv6 to the architectures and it should then run on your armv6 device again.

http://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/xcode_4_2.html

To improve download time and installation efficiency with Xcode 4.2, the standard Xcode installer excludes some large tool components, such as older simulators, that are not essential to the current development toolset. Xcode presents you with a dialog when the simulator needs to be downloaded. Documentation preferences has consequently been replaced with Downloads preferences, including both documentation and components (simulators and SDKs). Using the Components tab of the Downloads preferences pane, you can view a description of each available component, download and install it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!