Is it possible to install iOS 6 SDK on Xcode 5?
Xcode 5 has a preferences pane that allow one to download
iPhone 6.1 simulator, however I can't find a place where it allows
downloading of iOS 6 SDK, thus it is not possible to set the active SDK
to iOS 6 when developing with Xcode 5. Is there a workaround that would
allow Xcode 5 to install iOS 6 SDK?
EDIT: Workarounds should no longer be necessary now that Xcode 5 is generally available and allows you to download previous versions of the SDK. |
|||||||||||||||||||||
|
Yes, this is fine. I still build with iOS
4.3 for one project (it's been awhile since we updated; but they still
accepted it after iOS 6 came out), and I currently build 10.5 apps with
Xcode 5.
See How to point Xcode to my 10.6 SDK so it can be used as a "Base SDK"? for details on how to set it up. You can use my fix-xcode script to link everything for you every time you upgrade. The only trick is getting the old SDKs. If you don't have them, you generally need to download old versions of Xcode (still available on developer.apple.com), open the installer package, and hunt around to find the SDK you need. SDKs can be found within the installer package at: Xcode.app/Contents/Developer/Platforms/ | |||||||||||||||||||||
|
I was also running the same problem when I
updated to xcode 5 it removed older sdk. But I taken the copy of older
SDK from another computer and the same you can download from following
link.
http://www.4shared.com/zip/NlPgsxz6/iPhoneOS61sdk.html (www.4shared.com test account test@yopmail.com/test) There are 2 ways to work with. 1) Unzip and paste this folder to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs & restart the xcode. But this might again removed by Xcode if you update xcode. 2) Another way is Unzip and paste where you want and go to /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs and create a symbolic link here, so that the SDK will remain same even if you update the Xcode. Another change I made, Build Setting > Architectures > standard (not 64) so list all the versions of Deployment Target No need to download the zip if you only wanted to change the deployment target. Here are some screenshots. | |||||||||||||||||||||
|
Yes, I just solved the problem today.
Then you can choose the SDK like below : Hope this helps you. | |||||||||
|
You can download the older SDK and install it in
Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/ folder. Logout + Login just to make sure the changes take effect and you should see the older SDK in your new XCode | |||||||||||||
|
Find and download old SDK. Older SDKs are found here.
I have copied the xcode.app directory as Xcode_4.6.3.app. Now you can test and debug in both xcode versions. You have to run them from the corresponding folders or create shortcuts in your desktop. When building from command line give the parameter as iPhoneOS6.1 instead of iPhoneOS7.0 This worked great for me in Xcode5 and iOS. Go to into Xcode5's SDK dir. Its usually located at:
Add a symbolic link to the old SDK like this:
| ||||
| |||||
|
Can do this, But not really necessary
How to do thisJason Lee got the answer. When installing xCode I preferred keeping previous installations rather than replacing them. So I have these in my installation FolderSo /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs Contain different sdks. (Replace Xcode.app with correct number) copy previous sdks to /Applications/Xcode 3.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs Here is my folder after I copied one. Now restart xCode and you can set previous versions of sdks as base sdk. Why it is not necessaryRefering Apple DocumentaionTo use a particular SDK for an Xcode project, make two selections in your project’s build settings.
Rule is Use latest as base SDK and set deployment target to the minimum version app supposed to runFor example you can use iOS 7 as base sdk and set iOS 6 as deployment target. Run on iOS 6 simulator to test how it works on iOS 6. Install simulator if not available with list of simulators.Additionaly You can unconditionally use features upto iOS 6. And Conditionally you can support new features of iOS 7 for new updated devices while supporting previous versions. This can be done using Weakly Linked Classes ,Weakly Linked Methods, Functions, and Symbols https://developer.apple.com/library/ios/documentation/developertools/conceptual/cross_development/Using/using.html#//apple_ref/doc/uid/20002000-SW3 Weak LinkingSuppose in Xcode you set the deployment target (minimum required version) to iOS6 and the target SDK (maximum allowed version) to iOS7. During compilation, the compiler would weakly link any interfaces that were introduced in iOS7 while strongly linking earlier interfaces. This would allow your application to continue running on iOS6 but still take advantage of newer features when they are available. | ||||
Just to add, you can actually download old
versions of the simulator with Xcode 5 itself - just go to preferences
and you'll find them under Downloads:
| |||||||||||||
|
My app was transitioned to Xcode 5
seamlessly because it can still build with the original iOS Deployment
Target that you set in the project (5.1 in my case). If the new SDK
doesn't cause some insurmountable problem, then why not build using it?
Surely there are many improvements under the hood.
For example, I will much prefer to use Xcode 5 instead of Xcode 4.6.3. Why? I'll get a lot more battery life because the UI scrolling of text/code areas in Xcode 5 no longer chews up an entire CPU thread. | |||||||||
|
The other answers here are correct too, but I find the following steps to be the easiest:
Just download Xcode 4.6.3 from the dev center link that says "Looking for an older version of Xcode?" (currently points here) and mount the dmg. Then in terminal, copy the SDK files over:
Finally, relaunch Xcode and you're done. | |||
Linking the 6.1 SDK into Xcode 5 as
described in the other answers is one step. However this still doesn't
solve the problem that running on iOS 7 new UI elements are taken, view
controllers are made full-size etc.
As described in this answer it is also required to switch the UI into legacy mode on iOS 7:
Beware: This is an undocumented key and not recommended for App Store builds!Also, in my experience while testing on the device I found that it only works the second time I launch the app even though I'm running the code fairly early in the app launch, in +[AppDelegate initialize] .
Also there are subtle differences to a version built using Xcode 4.6.
For instance, transparent navigation bars behave differently (causing
the view to be full-size).However, since Xcode 4.6.3 crashes on Mavericks (at least for me, see rdar://15318883), this is at least a solution to continue using Xcode 5 for debugging. | |||
I downloaded XCode 4 and took iOS 6.1 SDK
from it to the XCode 5 as described in other answers.
Then I also installed iOS 6.1 Simulator (it was available in
preferences). I also switched Base SDK to iOS 6.1 in project settings.
After all these manipulations the project with 6.1 base sdk runs in comp ability mode in iOS 7 Simulator. | |||
Just for me the easiest solution:
To build your app in iOS 6, so the design of your app will be the older design on an iPhone with iOS 7 also: - Choose iOS6.1 in Targets - Base SDK Just note : When you change the base SDK in your Targets, iOS 7.0 won't be available anymore for building on the simulator ! |