Could Not Launch Mac (Designed for iPad) App in Xcode

I get the following message when I try to run this app in Xcode.

Could not launch AppName. Runningboard has returned error 5. Please check the system logs for the underlying cause of the error.

Interestingly, the destination Mac (Mac Catalyst) destination does launch. The funny thing is there is a companion app almost exactly like this one that launches fine. Any help with this would be greatly appreciated.

Xcode helped me to file a feedback. The number is FB13206919.

Answered by SpaceMan in 766290022

I fixed it. I temporarily changed the bundle id slightly. It launched and ran. Then I changed the bundle id back and it launched and ran.

Here's more info on this.

Could not launch “MyAppName” Domain: IDELaunchErrorDomain Code: 20 Recovery Suggestion: Runningboard has returned error 5. Please check the system logs for the underlying cause of the error. User Info: { DVTErrorCreationDateKey = "2023-09-27 03:23:51 +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

Accepted Answer

I fixed it. I temporarily changed the bundle id slightly. It launched and ran. Then I changed the bundle id back and it launched and ran.

Well, it got unfixed. Something is goofed up here.

I had the same problem with Apple NullDriver Sample project - for test application, calling device extension. the problem was solved after removal of com.apple.developer.driverkit.userclient-access key from application entitlements

Removing "com.apple.runningboard.assertions.webkit" from the application entitlements file is also a good idea in this scenario.

I had the exact same set of errors as @SpaceMan in my macOS app. Here the entire error stack:


Could not launch “CloudKitCMS”
Domain: IDELaunchErrorDomain
Code: 20
Recovery Suggestion: Runningboard has returned error 5. Please check the system logs for the underlying cause of the error.
--
Could not launch “CloudKitCMS”
Domain: IDELaunchErrorDomain
Code: 20
Recovery Suggestion: Runningboard has returned error 5. Please check the system logs for the underlying cause of the error.
--
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 tried editing apple id but without any success. I noticed that some people refer entitlements, so I inspected by CloudKitCMS.entitlements file and found that several keys there are totally irrelevant to the project:

<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.applesignin</key>
	<array>
		<string></string>
	</array>
<key>com.apple.developer.aps-environment</key>
<string>development</string>

So I completely removed the above keys and now it runs! I must note that my project doesn't use Push Notifications (aps-related keys) and I don't know how those keys got there, probably Xcode added them automatically.

So my recommendation would be to check the entitlements and remove everything that's not enabled for the bundle id.

I fixed it by removing all entitlements from my entitlements file, removing app groups and keychain sharing.

I ended up using Console.app and found a line that said exactly what was going on.

ProvisioningProfiles 06:18:17.706701-0400 {BundleIDHere}: Unsatisfied entitlements: com.apple.developer.networking.wifi-info

The list of supported entitlements for macOS is here: https://developer.apple.com/help/account/reference/supported-capabilities-macos

Removing the offenders from the target's entitlements file solved the problem.

Could Not Launch Mac (Designed for iPad) App in Xcode
 
 
Q