Unable to launch app on iPhone from Xcode

Hi,

I'm trying to test my app on my iPhone 12 Pro, but it's simply not launching and I'm not getting any valuable error information back.

When Xcode is finished compiling and attempts to launch the app, I get "Unable to launch [App Bundle ID]". Clicking more details gives me:

Code Block
Details
Unable to launch [App Bundle ID]
Domain: com.apple.platform.iphoneos
Code: -12
--
Request to launch [App Bundle ID] failed.
Domain: com.apple.dt.deviceprocesscontrolservice
Code: 2
Failure Reason: The operation couldn’t be completed. The process failed to launch. : Failed to launch process with bundle identifier '[App Bundle ID]'.
--
The operation couldn’t be completed. The process failed to launch.
Domain: FBProcessExit
Code: 64
Failure Reason: The process failed to launch.
User Info: {
BSErrorCodeDescription = "launch-failed";
}
--
The operation couldn’t be completed. Launch failed.
Domain: RBSRequestErrorDomain
Code: 5
Failure Reason: Launch failed.
--
Launchd job spawn failed with error: 2
Domain: NSPOSIXErrorDomain
Code: 2
Failure Reason: No such file or directory
--
System Information
macOS Version 11.0.1 (Build 20B29)
Xcode 12.4 (17801) (Build 12D4e)
Timestamp: 2021-02-20T23:07:52Z


I've never encountered anything like this before so I'm not sure what I can do?

Additionally, the app fails to load when clicking on it from the iPhone after Xcode has uploaded the app to the phone. It brings up a black screen and immediately closes. The same problem occurs when trying an iPad too.

Using Xcode's console connected to my iPhone, I see the following error when trying to manually launch the app: (not sure if this means anything)

Code Block
error 23:38:40.875438+0000 SpringBoard Snapshot generation request for bundleID: [App Bundle ID] rejected due to the app being denylisted.

Replies

Did you find a solution? I've experienced this with a new app today, and I'm not finding any way around this.
For me, the Mach-O Type was set to 'Bundle', changing this back to 'Executable' fixed this error.

I'm currently experiencing the same error when trying to build with Xcode 15 beta 4 onto a simulator running iOS 17. Did you mange to get this fixed?