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:
- Archive the app using Xcode 14 - choose the "Any iOS Device" run destination.
- In Organizer, select the archive, and "Show in finder".
- Expand the archive using "Show Package Contents", then open "Products -> Applications" to see the app - you ll need this later.
- Close Xcode 14, and open Xcode 15.
- In Xcode 15, in "Devices and Simulators", select your iOS17 device.
- 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.
- 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.
- 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