Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Submit an OSX App with helper App in its bundle

I'm really going mad with this problem! I have an app that contains a simple Helper app which manages the login item for the Main app.

When I try to submit the app I get errors related to the provisioning profile and the entitlements. I'm sure that the problem is related with the Helper app because before than I added it the submission worked with no problem.

At the moment the helper app is code signed and is sandboxed as the main app.

The errors are :

  • Invalid provisioning profile. The provisioning profile included in the bundle is invalid

  • Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the one that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile 'com.apple.application-identifier' in 'myapp.app/Contents/Library/LoginItems/helper.app'

  • Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the one that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile 'com.apple.application-identifier' in 'myapp.app/Contents/MacOS/myapp'

like image 204
MatterGoal Avatar asked Jun 27 '12 15:06

MatterGoal


2 Answers

For anyone else coming across this problem, you don't have to codesign the helper app a second time, just remove the "embedded.provisionprofile" from the helper app in the xarchive and you can submit no problem.

like image 146
seanalltogether Avatar answered Sep 21 '22 21:09

seanalltogether


The only solution that seems to solve this problem was codesign and sandboxing the helper app from Xcode and then:


Re-Codesign the Helper app from terminal

codesign -f -s "3rd Party mac Developer Application:" -i "com.bundle.YOUR.HELPER" --entitlements path/to/helper/entitlements YEOR-HELPER.app



Remove provisioning profile from Helper app, adding a "Run script" into the "Build Phases"

rm"${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/Library/LoginItems/YOUR-HELPER.app/Contents/embedded.provisionprofile"

With this solution we've correctly submitted our App.

like image 31
MatterGoal Avatar answered Sep 20 '22 21:09

MatterGoal