5

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.

Michael Wildermuth
  • 5,762
  • 3
  • 29
  • 48

2 Answers2

3

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.

Jason Coco
  • 77,985
  • 20
  • 184
  • 180
  • Thanks for the response. I have the deployment target set to 4.2 and I don't have any iOS5 only settings set and my app still won't run on my iTouch. My I build and run it just builds and then says finished running without every running on my iTouch. Everything worked fine on Xcode 4.0.2, I don't understand what happened when I switched to xcode 4.2 – Michael Wildermuth Oct 16 '11 at 06:53
  • Is your iPod Touch a 1G/2G? If that's the case, it's the architecture. The 1G/2G is armv6 and the default no project in Xcode 4.2 is armv7 only. Add armv6 to the architectures in settings and try again, it should work... – Jason Coco Oct 16 '11 at 07:03
0

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.

chown
  • 51,908
  • 16
  • 134
  • 170
  • In the organizer the second tab from my right is Archives and nothing shows up in there. Is that what you meant? Thanks. – Michael Wildermuth Oct 16 '11 at 07:06
  • Check out the bottom of this page: http://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/xcode_4_2.html – chown Oct 16 '11 at 07:22