I have a project which requires iOS 6.1 SDK and I have upgraded to XCode5 and dont see iOS 6.1 SDK in Build Settings -> Base SDKs. I have earlier SDK saved separately and tried copy-pasting it in /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs Directory. But it doesn't show up in Build settings -> Base SDKS. How can I use multiple SDKs in Xcode 5?
Instead of directly copy-pasting you should use symbolic link to avoid deletion of earlier SDKs on each XCode update..
1.Open terminal and go to following SDKs directory as shown below
cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
2.Paste SDK 6.1 or your desired earlier SDK in the documents or any other directory where it wont be deleted after future XCode updates. once you put the SDK in that directory , use following command to create a symbolic link. (for simplicity i have put SDK 6.1 in Documents directory)
sudo ln -s /Users/.../Documents/iPhoneOS6.1.sdk .
NOTE: don't forget to add a space and a dot after the command.
In a comment from a deleted answer, you said:
Using the 7.0 SDK caused all kinds of odd rendering issues in my apps on iOS7 that I didn't have time to fix immediately
I understand the issue here, but I feel compelled to say that I agree with trojanfoe, that best practice is that one really should use the latest SDK, but feel free to also support whatever prior iOS versions that your business requirements dictate. Thus, ideally, one should:
Set the minimum deployment target of the app to be whatever the earliest version of iOS you need to support:
Obviously write code that supports the range of iOS versions from everything from your app's minimum "deployment target" through to the latest iOS version. This will involve the usual spectrum of techniques listed in Supporting Multiple Versions of iOS of the iOS App Programming Guide, namely:
weak linking of frameworks that might not be supported by your earliest deployment target;
runtime checks for the existence of the classes;
runtime checks for respondsToSelector
for those methods that are not available in all versions of iOS you're supporting;
etc.
Then, if you want to test on the simulator for the earlier iOS version, in the scheme menu, choose the target iOS version:
Clearly, you'll want to test on physical devices still running the old iOS versions (as well as, obviously, the latest iOS versions), too. But using the simulator is a quick way to run the app through its paces against an earlier iOS version and ensure that you maintained backward compatibility.
I understand your concerns regarding this approach and I understand that this may not be for you, but I felt compelled out outline what I believe to be "best practice".
If you want to use previous SDK with xCode 5, just copy the previous sdk to contents->developer->patforms->iPhoneOS.platform After that restart the xCode. make sure you are opening xCode5 contents and pasting there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With