I'm new on Apple development and need some help for an issue about re-signing my app with distribution cert and provisioning profile.
My app is built, archived and exported in DevOps pipeline, using my Developer ID certificate (assigned by my company) and development provisioning profile. The build can be opened on a registered Mac but not on a non-registered Mac, which is expected as I'm using development provisioning profile.
For publishing the app on Mac App Store, here are re-signing steps in my company:
- Get a distribution provisioning profile from our development management team.
- Zip my app and the profile together, and then submit the zip file to our internal signing system.
- After processing, the signing system returns a new zip, claiming my app has been re-signed successfully.
I can see the embedded provisioning profile has been replaced with the distribution one, but unfortunately it can't be opened on any Mac, registered or not. I can't tell what the reason is? Could anyone help?
Fail screenshot:
Some error in console log:
LAUNCH: RBSLaunchRequest FAILURE <private> com.myCompany.MyApp <private> 0x0-0x7b07b failed with error Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x600000ec7120 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}
LAUNCH: Runningboard launch of com.myCompany.MyApp <private> returned RBSRequestErrorFailed, error Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x600000ec7120 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}, so returning -10810
LAUNCH: request execute thru runningboard of 0x0-0x7b07b com.myCompany.MyApp/<private> failed with error=Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x600000ec7120 {Error Domain=NSPOSIXErrorDomain Code=111 "Unknown error: 111" UserInfo={NSLocalizedDescription=Launchd job spawn failed}}}
App entitlements before re-signing:
<plist version="1.0">
<dict>
<key>com.apple.security.device.usb</key>
<true/>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.developer.team-identifier</key>
<string>MyTeamId</string>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
<key>com.apple.application-identifier</key>
<string>MyTeamId.com.myCompany.MyApp</string>
</dict>
</plist>
Entitlements in development provisioning profile:
<key>Entitlements</key>
<dict>
<key>com.apple.application-identifier</key>
<string>MyTeamId.com.myCompany.MyApp</string>
<key>keychain-access-groups</key>
<array>
<string>MyTeamId.*</string>
</array>
<key>com.apple.developer.team-identifier</key>
<string>MyTeamId</string>
</dict>
App entitlements after re-signing:
<plist version="1.0">
<dict>
<key>com.apple.application-identifier</key>
<string>MyTeamId.com.myCompany.MyApp</string>
<key>com.apple.developer.team-identifier</key>
<string>MyTeamId</string>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.device.usb</key>
<true/>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
</dict>
</plist>
Entitlements in distribution provisioning profile:
<key>Entitlements</key>
<dict>
<key>com.apple.application-identifier</key>
<string>MyTeamId.com.myCompany.MyApp</string>
<key>keychain-access-groups</key>
<array>
<string>MyTeamId.*</string>
</array>
<key>com.apple.developer.team-identifier</key>
<string>MyTeamId</string>
</dict>
alex_ms and I figured out what’s going wrong here. The issue is that the create-zip-archive step of their “DevOps pipeline” was not running on a Mac, and thus didn’t encode the Unix-y permissions (rwxr-r-x
) of their main executable in the zip archive. When you unpack this on the Mac, the main executable ends up with default permissions (rw-rw-r--
) and thus fails to launch.
The solution was to tweak the pipeline to run the create-zip-archive step on the Mac side of things.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"