Adding Older iOS Sdks to Xcode 4.1 in Lion

Adding Older iOS SDKs to Xcode 4.1 in Lion

Actually it is possible to add older SDKs as long as you can still get your hands on an older version of Xcode with the older SDK. It's useful too sometimes: when you do this you get to find out about unsupported constants and methods you may be using during compile rather than at runtime. Here's how to do it.

  1. Get hold of an older version of Xcode with the older SDK. The Apple iOS Dev Center currently lists the 4.3 SDK with the Xcode 3.2.6 download.

  2. Mount the dmg and open up the Packages folder hidden within the dmg via Terminal:

    open /Volumes/Xcode\ and\ iOS\ SDK/Packages/

  3. Double click the pkg file for the SDK version you want. I was looking for iPhoneSDK4_3.pkg but, in addition to 4.3, found packages as old as iPhoneSDK3_0.pkg. So perhaps older SDKs may still be packaged with the App Store download if you know where to find it (I didn't).

  4. Let it install in it's own folder of choice since you won't be able to force it to install in Applications/Xcode.app/Contents/Developer (which is where the Developer folder is now)

  5. You'll find the package installed in the Platforms folder in the volume you chose. Move the relevant SDK over to the Developer folder within Xcode.app. You'll likely have to use sudo:

    sudo mv /Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/

  6. Restart Xcode and you should see the new (old) SDK listed in your options for Base SDK. Yay!

Update as of 12 Sep 2013

If the "older SDK" you're trying to add comes bundled in Xcode 4.3 or later, adding the SDK is as simple as downloading Xcode from dev center link that says "Looking for an older version of Xcode?" (currently points here), mounting the dmg, then copying the relevant files over.

In terminal, you'd do something like this (edit for the appropriate SDK version number):

cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/

For SDKs from versions of Xcode prior to 4.3, the older steps are still relevant.

I found this happens to work for getting the Xcode 5 GM to compile builds that carry the old iOS 6 UI even when deployed on iOS 7 devices. Useful for fixing bugs pending a UI redesign. That said, there's got to be an easier way to get the iOS 6 UI on an iOS 7 device.

How to get ios4.3 SDKs in Xcode 4.1 for lion osx?

Simply go to your projects build settings -> Summary and set the "Deployment Target" to "4.3".

iOS SDK 4.0 for Xcode 4.1 (Lion)?

I tried copying the SDKs from Xcode 4, but it doesn't work.

Other answers suggest that it's not possible.

I'm now using a virtual machine with Snow Leopard to test on older devices. (Or real older devices, if you have one)

Is there a way to install older iOS SDKs in Xcode?

You can't install old 3.1 SDKs on Xcode 4. You can set the Deployment target lower to allow testing on devices running older OS versions than your current SDK installation. The only current way to completely ensure backward compatibility, while running more recent versions of Xcode, is to keep a device that runs iOS 3.x, and test on that device. (...because it is claimed that the old Simulators/tools sometimes actually allows APIs that won't run on an actual device with an OS of the same version).

Other methods include installing the different versions of iOS developer tools in a separate Developer_XYZ directories, and or keeping around a bootable HD with the older iOS developer tool installation (say Snow Leopard with Xcode 3.x, since Lion might only support running Xcode 4.x).

Is there a way to install older iOS SDKs in Xcode?

You can't install old 3.1 SDKs on Xcode 4. You can set the Deployment target lower to allow testing on devices running older OS versions than your current SDK installation. The only current way to completely ensure backward compatibility, while running more recent versions of Xcode, is to keep a device that runs iOS 3.x, and test on that device. (...because it is claimed that the old Simulators/tools sometimes actually allows APIs that won't run on an actual device with an OS of the same version).

Other methods include installing the different versions of iOS developer tools in a separate Developer_XYZ directories, and or keeping around a bootable HD with the older iOS developer tool installation (say Snow Leopard with Xcode 3.x, since Lion might only support running Xcode 4.x).

Lion + Xcode 4.1 deactivated iOS Simulator 3.x Testing

Actually you can install xcode 3.2.x in Lion, and it's will automatic installed in "developer-old" floder. Your xcode 4.1 is still available.
I also want to reactivate the older iOS Simulator SDKs on Lion / Xcode 4.1. ;)

NotMyName posted blow in devforums.apple.com

By reverting back to OS X 10.6.8, and Xcode 4.02, apparently. :-(

Although it is worth noting that the Apple employees posting here have repeated a few times that this is an intended change, and one might guess that either the various simulator versions weren't particularly accurate on their API levels, or that it was just too much work to maintain. I seem to remember there being some bugs in the block implementations at the various levels, for starters.

There's also the often reported mantra, "The simulator is NOT an accurate way of testing your app's behavior."

How to install other iOS simulators in Xcode 4.1?

You can download the simulators under Xcode Preferrences > Downloads > Components.



Related Topics



Leave a reply



Submit