Running iOS app from Xcode on Apple Silicon results in LaunchServices error

I am trying to run an iOS project as a Mac app on my M1 Mac Book Pro. It builds fine, but refuses to launch with an error that reads: "The LaunchServices launcher has returned an error. Please check the system logs for the underlying cause of the error."

The details of the error start out:

"Could not launch “” Domain: IDELaunchErrorDomain Code: 20 Recovery Suggestion: The LaunchServices launcher has returned an error. Please check the system logs for the underlying cause of the error. User Info: { DVTErrorCreationDateKey = "2022-08-03 16:08:24 +0000"; DVTRadarComponentKey = 968756; IDERunOperationFailingWorker = IDELaunchServicesLauncher; }

The operation couldn’t be completed. Launch failed. Domain: RBSRequestErrorDomain Code: 5 Failure Reason: Launch failed.

Launchd job spawn failed Domain: NSPOSIXErrorDomain Code: 153

"

I have gotten this error in both Xcode 13.3.1 and in the last three Xcode 14.0 betas (3, 4 & 5). The project runs fine in the iPhone simulator in all cases.

I have tried rebooting the Mac to see if that would clear out bad caches. That didn't help.

This is very strange because I successfully ran this iOS project as an Apple Silicon Mac app about a month ago. I even tried resetting the project to remove the few minor changes I made to it back to when it successfully ran as a Mac app.

Anybody know what's going on here and how to fix it?

Hi , Did you found any solution for above issue ? I am facing same issue when running MacOS app on my Mac.

Running iOS app from Xcode on Apple Silicon results in LaunchServices error
 
 
Q