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?

Pang
  • 9,564
  • 146
  • 81
  • 122
Fanruten
  • 3,782
  • 4
  • 19
  • 15
  • 2
    Please consider rewriting your question to be [Minimal, Complete, and Verifiable](http://stackoverflow.com/help/mcve) – Katya Willard Jun 21 '16 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 '16 at 22:36
  • There is duplicate question answered with ready disk images so you don't need install newer Xcode: https://stackoverflow.com/a/39865199/286361 – Vladimir May 26 '17 at 10:09

9 Answers9

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
Fanruten
  • 3,782
  • 4
  • 19
  • 15
  • 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 '16 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. – Jonathan Mitchem Jul 07 '16 at 22:29
  • 2
    Works for me with beta3 – mbo42 Jul 28 '16 at 02:37
  • 1
    Anyone have any luck with beta 6? – mlevi Aug 17 '16 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. – Hunter Monk Aug 30 '16 at 18:46
  • Still works with Xcode 8 and iOS 10.1 Beta 1, thanks! – Yannik Sep 22 '16 at 23:20
  • Is it possible to get this device support 10.0 folder without downloading xcode 8.0 . I mean if someone uploads this device folder and I user it after downloading it, will it work ?/ – niksya Sep 28 '16 at 10:10
  • this solution worked for me, but seemed to have a side effect: http://stackoverflow.com/a/19103815/1449799 – Michael Oct 02 '16 at 04:00
  • This answer showed me where to look. I wound up navigating to it in a finder window because the pathnames didn't match. I also blindly copied all the 10 folders to the corresponding Xcode 7 folder. It took a while processing symbol files. – Bob Wakefield Oct 12 '16 at 13:45
  • You can place the symbolic link at the following path as well. A restart of Xcode 7 was needed on my machine. Also if you copy the iOS 10 folder(s) to this path, it won't matter if you later move or rename Xcode 8: ~/Library/Developer/Xcode/iOS\ DeviceSupport – Walt Sellers Nov 03 '16 at 17:47
  • I'd like to add this works for Xcode 11 and Xcode 10 as well (i.e. you can debug your iOS 12 apps on a device with iOS 13 installed via Xcode 10) – strangetimes Jun 17 '19 at 14:48
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.

Edison
  • 11,881
  • 5
  • 42
  • 50
  • 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 '16 at 20:37
  • Yup, mentioned that in my post. Cheers. – Edison Sep 28 '16 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 03 '16 at 10:11
  • Nice answer @tymac - I followed your steps, but cannot see iOS 10 in the Deployment Target. Any idea? – Tal Zion Nov 04 '16 at 09: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 04 '16 at 16:03
  • Wow. I normally just upgrade, but the current Xcode 8.3 Beta breaks code in a library I'm using. I figured I was just stuck with having to push out via Crashlytics to test on my iPhone. This was a ***huge*** help. Thanks! – mbm29414 Feb 03 '17 at 22:47
  • @TalZion have same issue using iOS 10.2 with Xcode 7, cant see the iOS 10 deployment target, how do we check wether Xcode 7 is compatible with device (iPhone 6)? – dancingbush Feb 14 '17 at 16:40
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

rak appdev
  • 717
  • 8
  • 21
  • 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 '16 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 '17 at 03: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

TheFuquan
  • 1,737
  • 16
  • 18
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
Kevin R
  • 8,230
  • 4
  • 41
  • 46
ingconti
  • 10,876
  • 3
  • 61
  • 48
  • 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 '16 at 09: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.

D. Rothschild
  • 659
  • 9
  • 14
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

3176243
  • 561
  • 4
  • 7
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
Bryan
  • 3,199
  • 3
  • 16
  • 24
  • Does this actually work for you? I can't add an iOS 11 Simulator in Xcode 8. – Ortwin Gentz Jun 16 '17 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 '17 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. – Ortwin Gentz Jun 18 '17 at 10:27
  • will this method work on Xcode 7.3 and iOS 11 device? – DHEERAJ Sep 21 '17 at 04: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

ingconti
  • 10,876
  • 3
  • 61
  • 48