Note: It should be working on Xcode 4.5.1 and later.
Usually when you install Xcode or upgrade Xcode from an old version, the Xcode only include one version of the iOS SDK. Sometimes, it is not that convenient especailly when your code is not ready for the lastest iOS version.
For exanple, Xcode 5 conveys iOS 7 SDK as the default. For some of the projects, you may still want to build it based on the older iOS SDK, like iOS 6.1. At the same time, you may also need to code some new project that needs iOS 7. In such case, we need the Xcode to support more than one SDK.
Here is how:
- Download the older Scode (dmg file) which contains the iOS SDK that needed. For example, Xcode 4.6.1 contains the iOS SDK 6.1.
- Look into the dmg file, and find the folder “iPhoneOS6.1.sdk” (it varies for different Xcode versions) under “Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/“.
- Copy the folder iPhoneOS6.1.sdk into your Xcode folder “/Applications/Xcode/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs“.
- Restart Xcode
- In the “setting” of the project, you will see a new option – “iOS 6.1” as the “Base SDK“.