In iOS 16.0 Apple have made turning Developer Mode On mandatory if you want to physically connect your device to Xcode on Mac.
When you attempt to build and run to the device, Xcode displays following alert to tell you the destination isn’t valid because Developer Mode is disabled.
To Enable developer mode on iPhone
Settings -> Privacy & Security -> Developer Mode -> turn ON Developer mode as follows :
- In Settings app on iPhone, select Privacy & Security.
- Scroll down to the Developer Mode. Turn on it.
- After that, choose Restart from action sheet to restart your iPhone.
- A pop-up window appears when the phone is rebooted. To enable developer mode, click “Turn On” again and then enter the device password.