Fixing Codesign Issues with Helper Apps

I’ve been getting “Invalid binary” errors, while trying to upload a binary to the AppStore. The solution can be found in stackoverflow, i’m just pasting it here, for future reference…

1. Re-Codesign the Helper app from terminal:
[cc]codesign -f -s “3rd Party mac Developer Application:” -i “com.bundle.YOUR.HELPER” –entitlements path/to/helper/entitlements YOUR-HELPER.app[/cc]

2. 

Remove provisioning profile from Helper app, adding a “Run script” into the “Build Phases”:

[cc]rm “${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/Library/LoginItems/YOUR-HELPER.app/Contents/embedded.provisionprofile”[/cc]

After this, i managed to upload the binary!