Preparing your iOS device for development testing
While the easiest way to test your iOS project is in the iOS Simulator, you can of course also test it by debugging straight to your device. There are times, however, when this is inconvenient. You may need to test your app over the course of hours or days and wish to do so without being tied to your Mac. This is where the ability to deploy a version of your app while still in initial development is useful.
To do so, your iOS device needs to be prepared to accept and run non-release builds of your iOS apps.
Plug your iOS device into the Mac you use for development.
Launch XCode.
Choose Window > Devices and Simulators.
On your device, go to the home screen and wait for it to ask you if you wish to trust your computer. Tap Trust.
Enter your device passcode.
On your device, go to Settings > Privacy & Security.
Scroll to and then tap on Developer Mode.
Switch on Developer Mode then tap Restart to restart your device.
After your device restarts, enter your device passcode.
Your device will ask you to confirm that you wish to turn on Developer Mode. Tap Turn On.
Once again enter your device passcode.
Wait a moment for XCode to notice your device again and then prepare it for deployment.
When the preparing message in the Devices & Simulators disappears, your device is ready for deployment.
You can now use XCode or Apple's Configurator to deploy test builds to your device.
See also
On-device testing during development and Debugging straight to your iOS device topics