23

Xcode 15 beta does not come with Device support files for iOS 17. Any other way we would run iOS 17 devices on Xcode 14

Mojtaba Hosseini
  • 95,414
  • 31
  • 268
  • 278
Nitesh
  • 1,564
  • 2
  • 26
  • 53
  • 1
    What is important to you here? Do you just want to deploy or also connect and debug? – ephb Jun 20 '23 at 22:17

5 Answers5

28

In the terminal run:

defaults write com.apple.dt.Xcode DVTEnableCoreDevice enabled

Then restart Xcode 14 the iOS 17 device will show up in Xcode like below and you can run and debug the app as usual. (You may need to go to Devices and Simulators to pair/trust the device)

I have Xcode 15 beta installed alongside Xcode 14, I'm not sure if that's required or not.

enter image description here

Jonathan.
  • 53,997
  • 54
  • 186
  • 290
  • This is fantastic! Do you know if this is a new thing? What about any drawbacks to enabling it? – siburb Jul 12 '23 at 06:35
  • 2
    CoreDevice is the new way Xcode communicates with devices starting in Xcode 15. I think Apple were just testing it internally in Xcode 14 and had it disabled publicly. So this flag just enables that. I've not had any drawbacks so far – Jonathan. Jul 13 '23 at 16:06
  • Which terminal are you talking about ? Is there a terminal on xcode or macOS terminal it is . – Yash Jadhav Jul 19 '23 at 13:29
  • 2
    @YashJadhav macOS terminal – Nitesh Jul 19 '23 at 18:56
  • 1
    This is the solution! But keep in mind that you need Xcode14.3. With Xcode14.1 this does not work. – marceloamx Jul 20 '23 at 12:45
  • @Jonathan. This does not work anymore with Version 14.3.1 (14E300c) – Nitesh Jul 31 '23 at 08:28
  • @Nitesh Ah that's a shame, there shouldn't be any downside to staying on 14.3 I think. You can download old versions here: https://developer.apple.com/download/all/?q=xcode%2014.3 – Jonathan. Aug 02 '23 at 15:47
  • It works, I'm using Xcode14.3.1 – Hongbo Liu Aug 03 '23 at 06:34
4

It's a bit convoluted, but the only way I've found to test apps built using Xcode 14, on an iOS17 device - whilst still being able to debug is as follows:

  1. Archive the app using Xcode 14 - choose the "Any iOS Device" run destination.
  2. In Organizer, select the archive, and "Show in finder".
  3. Expand the archive using "Show Package Contents", then open "Products -> Applications" to see the app - you'll need this later.
  4. Close Xcode 14, and open Xcode 15.
  5. In Xcode 15, in "Devices and Simulators", select your iOS17 device.
  6. Hit the "+" button at the bottom of "Installed Apps", and drop the application file from step #3. You should see the build number of the app update in the "Installed Apps" list.
  7. You can now run the app built from Xcode 14 manually on the iOS17 device - not using "Cmd+R" from Xcode 15 or you'll replace the app you've just installed.
  8. Still in Xcode 15, attach to the app's process using "Debug -> Attach to Process" - breakpoints don't seem to work, but you can print to the log.

You can also of course deliver the app via TestFlight instead of steps 1-6, and then just attach to the app's process using Xcode 15, and your iOS17 device.

My original answer on the Apple Dev Forum here: https://developer.apple.com/forums/thread/730947?answerId=756651022#756651022

siburb
  • 4,880
  • 1
  • 25
  • 34
  • Whilst my answer here does technically work, there's now a much better solution from @Jonathan. below. – siburb Jul 12 '23 at 06:32
1

As of now, there are no device support files available for iOS 17.

With iOS 17+, we are using a new device stack (CoreDevice) to communicate with devices. With this new device stack, there is one DDI per platform (as opposed to per OS release). This same device stack will be shared across all versions of Xcode on your system, and installing a newer version of Xcode will update CoreDevice and its DDIs (just like how CoreSimulator is updated if you are familiar with that).

This effectively means that you now have a supported way of updating the device stack on your system to support newer target OS devices. With CoreDevice, you should be able to debug devices running future versions of iOS using Xcode 15. This may require first installing a newer Xcode in order to install newer CoreDevice and DDIs, so keep that in mind.

Of course, this also means there is a temporary hiccup in which the old unsupported path doesn't work, but the good news is that future-you will have a supported way of doing this which works out-of-the-box, no need to modify your Xcode.app.

Check out this Apple forum,

iOS17 Device support Apple reply

They are recommended to use Xcode 15 beta only.

Good news is, hereafter we don't need to update device support files in the future it will work by default if we install the latest version of XCode :)

AJR
  • 91
  • 1
  • 5
-2

One way to deploy to iOS 17 devices is to use Xcode 15.

bhagyas
  • 3,050
  • 1
  • 23
  • 21
Myke Savage
  • 262
  • 2
  • 5
-2

The Apple Developer forums officially say what you're trying to do is not supported even if it might have worked in the past. But if you want to explore non-official or hack-style approaches, you could consider the following:

  1. Boot a Corellium Virtual iPhone (by default it is jailbroken) for iOS 17
  2. Set up USBFlux to remotely pass the device as a virtually connected local USB device to your local Xcode 14.
  3. Debug attach to the named process and interact with it.

See https://support.corellium.com/features/connect/usbflux

One presumes you cannot upgrade to Xcode 15 - is that a correct assumption? If you are in that position an indirect approach is to improve the logging within your app and then see if installing it on iOS 17 shows any issue which could be subsequently debugging from logs viewable from the Console app.

Another approach is that if your app is modular and only one aspect of it fails, you could create a new app just incorporating the relevant module of concern and then get that working with Xcode 15 locally, and use that to debug your problem.

Faisal Memon
  • 2,711
  • 16
  • 30