Cannot debug on physical device.

Hello. I´ve build a simple Unity Game for iOS. At Xcode the xcworkspace loads an buids with no errors (only warnings). The problem is that even though the device appears as connected in the devices and simulators window (attached image), it does not appear when choosing it as the destination to run the app, only the simulators appear. I've been looking for a solution for several days and I can't find anything that works. I have unpaired the device, rebooted, reinstalled xcode ... Has something similar happened to anyone? I work with Xcode 12.5.1 and iphone runs ios 14.7.1.

Thanks.

Have you set your iPhone to trust your Mac? There should be a little pop up when you initially plug in your device. Also, if you create a new Xcode project for iOS, can you pick your iPhone as a run target?

Thanks for your answer. I tried your suggestion and sure enough, with a new project I can select the iPhone now. It may be some problem with the build that Unity generates or some parameter that needs to be changed in the Xcode project. Any suggestions to try?

Accepted Answer

I just realized that in Unity, before doing the build, you have to check the Device SDK option to Target SDK instead of simulator SDK. Now the device appears and not the simulators :)

Cannot debug on physical device.
 
 
Q