Adding an Old SDK to Xcode 4

I read that you can have several SDKs in Xcode 4 installed in the Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs . It was not clear how you can get these various SDKs. I would at least want to test iOS 4.0 instead of the latest version of iOS 4.3. Although it would be great to test on 3.2. My Xcode 4 is only installed with the latest 4.3 SDK in this directory. Is there a convenient way to add them?

+2
source share
3 answers

No, unfortunately, there is no convenient way. The easiest way is to install an earlier version and then upgrade it, if necessary, to the latest version.

+1
source

When you install Xcode 4.0, your previous version is renamed to something like "Developer-3.2.5." If you have a previous version of Xcode, you can simply do this:

 cd /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs sudo ln -s /Developer-3.2.5/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk . sudo ln -s /Developer-3.2.5/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk . 

If you do not have a previous version installed, uninstall Xcode 4.x, and then install Xcode 3.2 and start gradually from there. After installing Xcode 4.x, your previous version of Xcode 3.x will be renamed to disk, after which you can symbolize the SDK 4.0 / 4.1 under Xcode 4.0. Restarting Xcode 4.0 will give you 4.0 and 4.1 in the drop-down list of options.

+3
source

The Xcode download, available from http://developer.apple.com/downloads , contains packages that return before 4.0. I recently got into the same problem and was able to determine that:

  • Starting with version 4.1 (perhaps earlier - still awaiting download for Xcode 3.2.3 and SDK 4.0.1), packages contain subpackages called fairly similar
  • Despite the package’s internal name, it seems that the real iOS SDK will be included for the version mentioned in the main DMG file. For example, xcode_3.2.5_and_ios_sdk_4.2_final.dmg may contain what appears to be an SDK for a version group, but the iOS SDK is fully enabled only for 4.2.
  • I was able to access the files 4.1, 4.2 and 4.3 by downloading the DMC Xcode installers, viewing the package contents and running the corresponding iPhoneSDK4_X.pkg installer.
  • After installation, I had to copy the material that it fell from /Platforms/iPhoneOS.platform/ to a new location on /Developer/Platforms/iPhoneOS.platform.
  • In addition to the iPhoneOS SDK, I also made sure that the iPhoneSimulator.platform stuff was there. It seems to me that Xcode handles most of the device support for debugging.

Hope this helps! The hard part for me was understanding that the names of the packages may be the same, but the content may be different. It seems that each download includes one full SDK.

Once I did this, I was able to change the base SDK in Xcode and build against the target SDK.

Hurrah!

PS: After adding additional SDKs, you will most likely see additional destinations displayed in the list of schemes with identical device names for physical devices. This made me crap, since each of them is associated with one of the SDKs, but the SDK version is not listed. It’s not bad when you find out what is usually a symptom, which is an unsuccessful assembly, as it targets another SDK based on which physical device is selected. More info in this post: duplicate device schema in xcode 4

+1
source

All Articles