56

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

8
  • 1
    What is important to you here? Do you just want to deploy or also connect and debug?
    – ephb
    Commented Jun 20, 2023 at 22:17
  • 3
    I have xcode 14.2 . my Mac is 2015 and can not upgrade xcode. My iPhone is IOS 17. what should I do? should I buy a new Mac?
    – EhsanR
    Commented Sep 26, 2023 at 6:41
  • @EhsanR Yes upgrade to new Mac. as of now we have not discovered any other way. You must have Xcode 15 beta installed alongside Xcode 14 to debug on Xcode 14
    – Nitesh
    Commented Sep 27, 2023 at 7:07
  • 1
    @EhsanR Don't you have a few thousand dollars laying around? What are you, a peasant?
    – Rolf
    Commented Feb 9 at 19:18
  • 1
    @Rolf yeah man, everyone got a few thousand dollars spare in their pockets, ehsan must be a peasant Commented Mar 11 at 5:59

9 Answers 9

98

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.

Important Point: It turns out Xcode 15 is required to complete initial device setup for development. After the device setup is completed on Xcode 15, iOS 17 devices can be used with Xcode 14 too.

enter image description here

31
  • 4
    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.
    Commented Jul 13, 2023 at 16:06
  • 2
    @YashJadhav macOS terminal
    – Nitesh
    Commented Jul 19, 2023 at 18:56
  • 7
    This is the solution! But keep in mind that you need Xcode14.3. With Xcode14.1 this does not work.
    – marceloamx
    Commented Jul 20, 2023 at 12:45
  • 6
    It works, I'm using Xcode14.3.1
    – Hongbo Liu
    Commented Aug 3, 2023 at 6:34
  • 3
    I'm on Monterey 12.7, running XCode 14.3 with an edited info.plist. The CoreDevice shows up, but getting an error: "(CoreDevice) has an unknown or unreported architecture. Please use a different device." Thanks Tim.
    – JCraine
    Commented Oct 12, 2023 at 6:07
8
+25

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

1
  • Whilst my answer here does technically work, there's now a much better solution from @Jonathan. below.
    – siburb
    Commented Jul 12, 2023 at 6:32
7

When it comes to deploying your app on iOS 17 (or macOS 14, watchOS 10, tvOS 17, DriverKit 23, or visionOS 1) devices, there’s one officially endorsed method: utilizing Xcode 15.

iOS 17 requires Xcode 15 for deployment

For those who prefer to stick with an older Xcode version (i.e. Xcode 14.3.1 or an earlier iteration), don’t fret. You can still make it work by enabling CoreDevice with a simple commands in terminal:

defaults write com.apple.dt.Xcode DVTEnableCoreDevice enabled

Once you’ve executed this command, a quick restart of Xcode will have everything operating smoothly. If, however, you still encounter deployment errors on your device, the solution lies in installing Xcode 15. This installation will automatically fetch the necessary files, conveniently shared on your system.

To know the basic concepts behind it, please checkout the link.

1
  • I tried so many times but not working this trick. my ios device has ios 17.2, macos 12.6.6 (21G646) and xcode version 14.2. Commented Dec 27, 2023 at 5:58
5

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 :)

1

Here is a workaround that has been working for me to support iOS 17.x in Xcode 14.x on older macOS versions.

Prerequisites:

  1. You should have Xcode 14.x installed. (This Xcode version depends on the latest Xcode version supported by your macOS. In my case, I'm using Xcode 14.3.1 with macOS Ventura 13.1. You can download the appropriate Xcode version from Xcode Releases based on your requirements.
  2. You'll also need Xcode 15.x to run the application on an iOS 17.x device.

Follow these steps:

  1. Start by cleaning your derived data.
  2. Quit Xcode.
  3. Open Terminal.
  4. Locate your Xcode application in the Applications folder in Finder.
  5. Drag your Xcode 15.x app from Finder into the Terminal. After dragging, add /Contents/MacOS/Xcode to the path. The full command should look something like this: /Applications/Xcode-15.0.1.app/Contents/MacOS/Xcode.

enter image description here

  1. Press Enter to run the command. If you encounter any errors in the Terminal, repeat step 5.

enter image description here (Reference for the error)

  1. Follow the Xcode agreement and iOS 17.0 installation steps. You will notice that when you open this version of Xcode (Xcode 14.x), the Terminal will also open. Don't close the Terminal because it will close Xcode as well

enter image description here

  1. Now, open your Xcode 14.x, select your iOS device, and run your project. It should work.

enter image description here

This solution has been tested and confirmed to work in the following environments:

  1. macOS Ventura 13.1 (22C65)
  2. Xcode 14.3.1 (I'm using this Xcode version for all my projects)
  3. Xcode 15.0.1 (Used to install iOS 17.0 on my machine)

For more detailed information, you can also refer to my Medium article on Supporting iOS 17 in Xcode 14.x on Older macOS Versions.

I hope this helps!

1

It appears that there's an officially-sanctioned workaround via XCode Cloud.

According to Apple Developer you can run builds on XCode Cloud with XCode 13.4.1 installed locally. As far as I can see, it appears that XCode Cloud allows you to build for the latest ios -- configure the build locally, perform the build with Apple cloud resources. The free tier (free, with your Apple Developer subscription) only gives you 25 free build hours per month, but even if you need 100hrs/mo, it's still cheaper than buying a new MBP.

0

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.

-1

When update new Xcode Command Line Tools defaults write com.apple.dt.Xcode DVTEnableCoreDevice enabled maybe not work. Use disbled before run enabled again.

  1. Close Xcode
  2. Open terminal and run 2 command line

defaults write com.apple.dt.Xcode DVTEnableCoreDevice disbled

...and...

defaults write com.apple.dt.Xcode DVTEnableCoreDevice enabled

-6

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

4
  • 1
    Why so many downvotes? This is actually a valid answer.
    – HangarRash
    Commented Jun 20, 2023 at 0:22
  • I see a lot of down voting on these answers; it surprises me. I suggest an improvement to say "the only officially supported way ... ". Commented Jun 24, 2023 at 10:22
  • 15
    Because it is not an answer to the question.
    – Ben Thomas
    Commented Jul 19, 2023 at 9:35
  • Xcode 15 is not live yet and even if it was live, it might be the case that they did not provide any solution to that problem. It does not make sense to suggest using Xcode 15 without actually trying it first. Commented Jul 21, 2023 at 8:19

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