'.net MAUI not able to debug on physicle iPhone

I've been following this blog for getting started with MAUI on macOS.

https://dev.to/davidortinau/installing-net-maui-on-macos-4mmc

I have everything set up as instructed but the tutorial only show how to start your project on the ios simulator.

I tried plugging my iPhone UUID into this command below but it gives me an error saying that it couldnt find the simulator. I dont want it to run on simulator. I need to find a way to start the app in the physical iPhone.

dotnet build -t:Run -f net6.0-ios -p:_DeviceName=:v2:udid=02C556DA-64B8-440B-8F06-F8C56BB7CC22

I'm on version 6.0.102

Has anyone been having the same issue?



Solution 1:[1]

If you want to use a physical device, don't use the :v2:udid= prefix. So the command simply becomes: dotnet build -t:Run -f net6.0-ios -p:_DeviceName=02C556DA-64B8-440B-8F06-F8C56BB7CC22

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Gerald Versluis