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'
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With