'Xcode: Failed to prepare device for development

When I run my app in my real device (iPhone 11 Pro, OS: IOS: 15.4) in Xcode (version: 13.3), the build is succeeded, but the app does not launch in my phone and I receive this message in Xcode:
enter image description here

How can I resolve this ?



Solution 1:[1]

Well, here is a short story that I've experienced during my casual work day.

I tried to pair new phone to XCode and it prompted exactly same error as yours. At the end of the day it turned out that phone had an Apple Watch that is paired.

We simply disabled/unpaired the phone from Apple Watch and it worked out.

Maybe you can give it a try.

Edit: Finding the XCode version that supports iOS 15.4 may also work.

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