I am using Xcode 15.0.1 to build my iOS app. I'm using my physical device which is running iOS 17. When I try to run the app, a popup error says:
Failed to install the app on the device.
It was working fine previously but randomly showed up. I haven't been able to run the app on my test device since.
This seems to be an iOS 17 issue. The steps that worked for me:
Settings > Developer > Clear Trusted Computers
Window > Devices & Simulators