Is it possible to install iOS 7 SDK on Xcode 6?

39,741

Solution 1

Seems like if you symlink the relevant SDK from a previous installation of Xcode to the Xcode 6 Beta directory, Xcode 6 will be able to use it. Assuming you still have Xcode 5.1.1 on your machine, try the following in terminal:

ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk /Applications/Xcode6-Beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.1.sdk

This should link the iOS 7 SDK for iPhone (not sim), allowing you to select iOS 7 as the Base SDK in Xcode 6 Beta. If you want to do this for the simulator, replace iPhoneOS.platform with iPhoneSimulator.platform.

NOTE: Just because you have the iOS 7 SDK now doesn't mean it'll build. I'm personally having trouble with the fact that Xcode 6 Beta is using the Apple LLVM 6.0 compiler, which apparently isn't compatible with some of the stuff I'm trying to build.

ref: https://stackoverflow.com/a/11424966/2383003

Solution 2

Just posting so that someone might find it useful: I wanted to debug my app in iPhone running iOS 7.1, in XCode 6.0.1. The previous iOS version was not being listed in the settings page, to choose as base SDK/deployment target. (I'm using OS X 10.10 Yosemite). I installed both XCode 6.0.1 and Xcode 5.0.1 and copied

/Application/XCode501.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk

to

/Application/XCode601.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/

Now I'm able to run iOS 7 apps from XCode 6.0.1.

Solution 3

Just repeating Christian's comment (on Ziewvater's answer) so it's more prominent:

What's strange is the fact that after adding the symbolic link to my Xcode folder, I see my device twice with the exact name and with some infos (iOS build number, model, device identifier) in the target selector in the upper left corner of Xcode. Depending on which of the both entries I chose, my app works fine or not, no matter which BASE SDK I chose. ??! Anybody experiencing the same?

This is exactly my experience also! Me and my team were tearing our hair out trying to understand why some builds seemed to be working and others were not.

It looks like Apple must be ignoring the base SDK (or target... or something) when you pick the wrong device from the list.

Solution 4

I changed the deployment target just fine and installed on my iOS7 iPhone 4s all the same. You can do all your development this way and then use 5.1.1 to make your relevant builds. I wouldn't advice to build apps for production in this beta environment even if you could.

Share:
39,741
Pavan
Author by

Pavan

Trying to be a Swift expert.

Updated on May 03, 2020

Comments

  • Pavan
    Pavan about 4 years

    I have Xcode 6 installed but realise that I am only able to develop for iOS8. I am aware that this beta development kit is meant for the development of the iOS 8 beta release but I am in a position where I don't have the time yet to develop for it but wish to take advantage of some of Xcode's new features while I am developing for my current iOS 7 apps.

    What can I do to get the iOS 7 SDK installed on xcode 6?

  • ankushg
    ankushg about 10 years
    Is it possible to get the Xcode 6 Beta to use Apple LLVM 5.1?
  • Ziewvater
    Ziewvater about 10 years
    I don't know, that's exactly the issue I tried to solve for myself, but wasn't able to find a way to do it. I'm not familiar with compilers at all, so I was basically just feeling around in the dark. If you find a way to get it to work, please let me know.
  • Luc
    Luc almost 10 years
    I simply changed my development target to iOS 7.0 and it worked. +1
  • ThomasW
    ThomasW almost 10 years
    Deployment target doesn't change which version of the SDK the project is built with. It is the "base SDK" setting that determines the build SDK. For Xcode 6 only iOS 8 is available by default.
  • Easwaramoorthy K
    Easwaramoorthy K almost 10 years
    Hey this is awesome ! It worked for me.. Thanks a lot !
  • Hari Honor
    Hari Honor almost 10 years
    Note, the latest Xcode6 (GM) is called just plain "Xcode" and therefore tries to overwrite the existing "Xcode" (5), but if you keep them both, and name the former "Xcode 6" the command line changes to the following: ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneO‌​S.platform/Developer‌​/SDKs/iPhoneOS7.1.sd‌​k /Applications/Xcode\ 6.app/Contents/Developer/Platforms/iPhoneOS.platform/Develop‌​er/SDKs/iPhoneOS7.1.‌​sdk.
  • Hari Honor
    Hari Honor almost 10 years
    Also worth noting for those who haven't fully grocked it yet: if you build for the iOS7 SDK (i.e., as well as "deployment target") then a device running iOS8 will use the older framework and run (nearly) identically to one which hasn't upgraded yet. So if you don't need any iOS8 features, I believe you're safe sticking with the older SDK.
  • Christian
    Christian almost 10 years
    What's strange is the fact that after adding the symbolic link to my Xcode folder, I see my device twice with the exact name and with some infos (iOS build number, model, device identifier) in the target selector in the upper left corner of Xcode. Depending on which of the both entries I chose, my app works fine or not, no matter which BASE SDK I chose. ??! Anybody experiencing the same?
  • Benjamin Dobell
    Benjamin Dobell over 9 years
    @Christian Wow! You're spot on! Looks like XCode is overriding the base SDK based on which "device" you pick!
  • moliveira
    moliveira over 9 years
    I see the same thing. One of the device "duplicates" runs as tho is was built with iOS7 but the other runs like it was built with iOS8 (as do my simulators).
  • abcd
    abcd over 9 years
    Apple is pushing for use of iOS 8 SDK only: developer.apple.com/news/?id=10202014a
  • Morten Holmgaard
    Morten Holmgaard over 9 years
    Any solution for this problem?
  • Benjamin Dobell
    Benjamin Dobell over 9 years
    @MortenHolmgaard The solution is to pick the correct (in my case first) device in XCode. If you're using a third-party tool like AppCode, which only shows the "incorrect" device, then you're out of luck.
  • Fernando Mazzon
    Fernando Mazzon over 9 years
    I know, my answer was more in response to the content "I have Xcode 6 installed but realise that I am only able to develop for iOS8." than the title, which is his real problem. There is no good reason to build using an older SDK even if he could.
  • Warpling
    Warpling over 9 years
    Thank you for the link @Carl!
  • mandeep-dhiman
    mandeep-dhiman almost 9 years
    Joe M +1 Same thing I did for macosx10.8 sdk and it work like a charm
  • Kyle Robson
    Kyle Robson almost 9 years
    This technique still works for using the Xcode 8.x SDK in Xcode7.