Application Could Not Be Uploaded to the Device (iPhone)

It is annoying that every once a while deploying app from Visual Studio to iPhone, it will just fail. Maybe try again. Then it fail again. But they used to work without problem and in fact they work 2 weeks ago! I have connected the cable and Visual Studio detected my iPhone, what else it want?

ERROR: The device must be paired before it can be connected. (com.apple.dt.CoreDeviceError error 2.)
The device must be paired before it can be connected. (com.apple.dt.RemotePairingError error 2.)

If you have the same problem, connect your iPhone to your Mac. Then open Xcode. Go to Window > Devices and Simulators. Select the iPhone that is currently connected and make sure it is trusted. If it is not, it will now force your iPhone to popup the trust this device dialog.

Previously if the device . iPhone isn’t trusted, it won’t even show up in the device list in Visual Studio for Mac. Now it will still show up but deploy always end in failure.

Source: https://developer.apple.com/documentation/xcode/running-your-app-in-simulator-or-on-a-device#Configure-the-list-of-simulated-devices

Leave a comment