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

2019-01-17 05:53发布

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?

5条回答
Emotional °昔
2楼-- · 2019-01-17 06:34

in Xcode 6.1.1 (Window -> Preferences - Downloads) you can install iOS 7.1 simulator. unfortunately it doesn't install iOS 7.1 SKD. if you set deployment target to 7.1 all builds without any trouble. be worry!!!! it is up to you to check the compatibility with 7.1 (SDK is still 8.1). so or so, all runtime trouble should be seen in simulator. i use this approach to build for my iPhone 4 in swift, where iOS 7.1.2 is the last available. (simply don't use any classes available only for newer devices :-))

查看更多
老娘就宠你
3楼-- · 2019-01-17 06:43

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.

查看更多
地球回转人心会变
4楼-- · 2019-01-17 06:45

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

查看更多
三岁会撩人
5楼-- · 2019-01-17 06:50

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.

查看更多
神经病院院长
6楼-- · 2019-01-17 06:50

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.

查看更多
登录 后发表回答