Xcode failing to "prepare my iPhone 13 Pro for development"

I’ve been trying to pick up a little Swift programming and getting myself more familiar with Xcode. I have a couple of basic projects that will run on the simulator but I want to actually try these apps on my phone. I went through the pairing process and keep getting a “Failed to prepare the device for development” error. Things I’ve tried:

  • Making sure the latest version of iOS is on my phone
  • Making sure the latest version of Xcode is installed on my iMac
  • Restarting both devices
  • Switching out the USB<->lightning cable
  • Connecting wirelessly
  • Resetting location and privacy settings on my phone

Same error persists. What I’m running:

  • iPhone 13 Pro; iOS version 16.4.1
  • Late 2015 27" iMac; MacOS Monterey v12.6.6
  • Xcode version 14.2 (14C18)

…I have considered that perhaps my iMac is just too old (would that be a reason?), I’m waiting to see what happens at WWDC before I make any upgrade decisions.

Have you enabled Developer mode on the iPhone?
It’s at the bottom of Privacy within Settings.

I think Xcode 14.2 supports up to iOS 16.2.

For iOS 16.4.1 (PS: latest is 16.5 by now) you need Xcode 14.3, for which you need to run macOS Ventura.

Unfortunately your Mac seems to be too old to run Ventura: