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

3.3k views Asked by At

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

I own a iPhone 4s and an iTouch which has has ios 4.2 on it. After upgrading Xcode to 4.2 to work with my iPhone 4s, I can't use Xcode with my iTouch anymore. How do I setup Xcode to work my iTouch on 4.2 and my iPhone on ios5?

Also I tried setting the base sdk by selecting other but there is nothing else in the list, all I get is a dialog window that I can manually type in. Do I need to add an option there?

Thanks.

2

There are 2 answers

2
Jason Coco On BEST ANSWER

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.

2
chown On

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.