138

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?

3
  • 2
    Please consider rewriting your question to be Minimal, Complete, and Verifiable Jun 21, 2016 at 13:19
  • 4
    @ParagBafna: but objective-c and swift are programming languages! Which makes Xcode a tool used primarily for programming. This question should've never been closed.
    – tharkay
    Jul 26, 2016 at 22:36
  • There is duplicate question answered with ready disk images so you don't need install newer Xcode: stackoverflow.com/a/39865199/286361
    – Vladimir
    May 26, 2017 at 10:09

9 Answers 9

198

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
11
  • If this doesn't work for you then it's simply because there is no Xcode_7.2.1.app it's just Xcode.app, thank you for this!
    – Markus
    Jun 26, 2016 at 18:56
  • 4
    This does not seem to work with iOS 10 beta 2. It errors with kAMDMobileImageMounterDeviceLocked. Haven't found a workaround yet. Jul 7, 2016 at 22:29
  • 2
    Works for me with beta3
    – mbo42
    Jul 28, 2016 at 2:37
  • 1
    Anyone have any luck with beta 6?
    – mlevi
    Aug 17, 2016 at 14:48
  • 4
    If this answer isn't working for you, check to make sure the ending string of your Device Support folder ex. (14A5309d) matches the version on your iOS device. It denotes the beta seed. If it doesn't, update your Xcode to match the seed of your iOS device, then follow the answer above. Aug 30, 2016 at 18:46
70

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.

7
  • 2
    Just as a side note, processing symbol files could take several minutes. I'm on the latest and greatest MacBook Pro and it's taking a while. I've had to unplug the phone after I first plugged it in b/c Xcode mistakenly said it was locked. After that it worked great, but took a while to process the files.
    – kbpontius
    Sep 28, 2016 at 20:37
  • Yup, mentioned that in my post. Cheers.
    – Edison
    Sep 28, 2016 at 21:40
  • We need to support iOS 6 and 7, so I used the above technique to add 6.0, 6.1, 7.0 and 7.1 support to Xcode 8.
    – iCyberPaul
    Oct 3, 2016 at 10:11
  • Nice answer @tymac - I followed your steps, but cannot see iOS 10 in the Deployment Target. Any idea?
    – Tal Zion
    Nov 4, 2016 at 9:00
  • @TalZion You're not seeing the version in the pull-down because you have to make sure the version of Xcode you're using is compatible with the version on your device. This is a sim disk image issue.
    – Edison
    Nov 4, 2016 at 16:03
25

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

2
  • Nice! What versions of Xcode are you using? It looks like you're using both Xcode and Xcode beta - could you add a version for both?
    – Cullub
    Aug 18, 2016 at 20:50
  • 1
    this solution worked for me! i had to go back to xcode 7.3.1 to work on an old project stuck on swift 2.x < 2.3 (due to 3rd party library dependencies that are not compatible with higher swift versions), and i can now build to my iphone on iOS 10.2, thanks!!
    – greenhouse
    Jul 18, 2017 at 3:40
2

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

1

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
1
  • For symbolic link From XCode 8 Beta 5 to Xcode 7: sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0\ \(14A5335a\)/ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/10.0
    – cdf1982
    Aug 14, 2016 at 9:51
0

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.

0

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

0

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
4
  • Does this actually work for you? I can't add an iOS 11 Simulator in Xcode 8. Jun 16, 2017 at 18:56
  • @OrtwinGentz See if you can launch the simulator in Xcode 9 - if it runs, you should be able to close Xcode 9 and debug your app on the Simulator from XC 8.
    – Bryan
    Jun 17, 2017 at 10:53
  • I can launch the Simulator in Xcode 9, sure. But I can't build with Xcode 8 (against the iOS 10 SDK) and debug on the iOS 11 simulator. Jun 18, 2017 at 10:27
  • will this method work on Xcode 7.3 and iOS 11 device?
    – DHEERAJ
    Sep 21, 2017 at 4:26
-1

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

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.