Launch failed! Failed to launch on device. Make sure your install of Xcode matches or is newer than the OS on your device

I have facing this issue while trying to launch the app on iPhone. Any clues?

LogPlayLevel: Instruments Usage Error:
Unknown device specified: “”

LogPlayLevel: ERROR: Launch Failure

LogPlayLevel: RunUAT ERROR:
AutomationTool was unable to run
successfully. PackagingResults: Error:
Launch failed! Failed to launch on
device. Make sure your install of
Xcode matches or is newer than the OS
on your device.

It was running fine and then I tried to run on another device but I got this issue and when I tried to use the same device again, the issue persisted.

OS: Mac
Environment: Xcode and UE4.18