Fanruten
Fanruten

Reputation: 3782

Use Xcode 7 with iOS 10

I want to use Xcode 7 with iOS 10.

As I understand, working with iOS 10 beta requires Xcode 8 beta, so I should upgrade my Xcode. However, my code can't be built by the new compiler, so I want to stay with Xcode 7.

How can I achieve that?

Upvotes: 138

Views: 55712

Answers (9)

ingconti
ingconti

Reputation: 11636

my two cents for Xcode Version 11 beta against Xcode 10 after wwdc2019:

ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/13.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/13.0

so I can use my iPhone with iOS 13 beta in Xcode 10.

after ln -s , pls relaunch Xcode

Upvotes: -1

Bryan
Bryan

Reputation: 3219

Here it is for XCode 9 and iOS 11 Beta 1:

sudo ln -s \
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0\ \(15A5278f\) \
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0

Upvotes: 0

rak appdev
rak appdev

Reputation: 717

For me none of the above suggestions worked.

Instead, I navigated to this location(press CMD+SHIFT+K to insert the below path) (through finder)

/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport

And copied the 10.0(14A5339a) folder, which contains the developer disk image. I then pasted it into

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport

EDIT: I'm using Xcode7 (version 7.3.1-7D1014),iOS 10 public beta 6(14A5345a)-this is released on aug 19,2016

Upvotes: 25

TheFuquan
TheFuquan

Reputation: 1787

Although copying the folder containing the disk image is still the best way to go, i had no time downloading the newest Xcode to get hold of the disk image folder, so i basically archived the app and exported it using the save for development deployment option, then installed it on the test device using iTunes app.

In my case i hade Xcode 8.0 wanting to build on a 10.2.1 iOS device.

enter image description here

Upvotes: 2

3176243
3176243

Reputation: 569

One warning. I tried to use XCode 7.3.1 with ios 10 images from XCode 8.1 for cordova project (it works), but had problems with push notifications permissions (different setups for ios 8/9/10). Not sure about it, but it seems to me that some compiler directives are missing in 7.3.1

Upvotes: 0

Edison
Edison

Reputation: 11987

You can use any SDK on an older build of Xcode simply by copying and pasting the folder of the OS you need. Also you obviously cannot have two apps with the same name so just rename them to Xcode 7 and Xcode 8.

right-click / ctrl-click the Xcode 8 application icon to show the package contents and navigate to this location and copy the iOS 10.0 or WatchOS 3.0 folder etc.

/Applications/Xcode8.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport /Applications/Xcode8.app/Contents/Developer/Platforms/WatchOS.platform/DeviceSupport

enter image description here

Then navigate to the same location in Xcode 7 and paste the folder.

/Applications/Xcode7.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport /Applications/Xcode7.app/Contents/Developer/Platforms/WatchOS.platform/DeviceSupport

enter image description here

Restart Xcode 7. You'll have to wait a while for Xcode to rebuild the symbols etc.

Upvotes: 70

D. Rothschild
D. Rothschild

Reputation: 719

Tymac's answer almost worked for me. Rather than copy and past, I had two Finder windows opened and then dragged the iOS 10 folder to the Xcode 7 folder. Once it's in Xcode 7, open the folder and make sure there is a dmg file.

Earlier I had dragged a copy of the iOS 10 device support folder to my desktop then copied it to the Xcode 7 folder. That seemed to unpack the dmg file so Xcode 7 still complained. Needs to be a dmg file in the folder.

Upvotes: 0

Fanruten
Fanruten

Reputation: 3782

You need use DeveloperDiskImage from Xcode 8 Beta. For this extract Xcode 8 Beta app and copy DeveloperDiskImage for iOS 10 to your Xcode folder.

Suppose you extract Xcode to Downloads/Xcode-beta.app

cp -r /Users/fanruten/Downloads/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0\ \(14A345\) /Applications/Xcode_7.2.1.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport

After copy DeveloperDiskImage you should start Xcode and connect iOS device to your mac.

Edit:
With a standard Xcode install one can create a soft link:

sudo ln -s \
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0\ \(14A5309d\) \
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0

Upvotes: 198

ingconti
ingconti

Reputation: 11636

Pascal && Fanruten are right.

tested on 12th aug, Xcode Version 7.3.1 (7D1014) AND iOS 10.0 (14A5309d) on iPhone6 Plus.

I made a symbolic link as suggested (path are a bit different... see below.) but works with linking to Xcode Version 8.0 beta 4 (8S188o).

only for completeness:

Beta 4

sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0\ \(14A5322e\)/  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0

Beta 5

sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0\ \(14A5339a\)/  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0

Upvotes: 1

Related Questions