We're attempting to update on of our apps from Unity 2019 to Unity 2021. Attempting to notarize the built app fails. This is on our main build machine running macOS Catalina 10.15.7. An independent contractor working with us builds the exact same project on his laptop running macOS Catalina 10.16.7. He can notarize the app successfully.
Now, her's the interesting part. As a test, the two of us built new apps and transferred them to each other's systems. The app transferred from the build machine (10.15.7) to the laptop (10.16.7) notarized successfully, while the one transferred the other way failed. Would love to get some insight on what's going on.
Log output:
{
"logFormatVersion": 1,
"jobId": "b48937dd-37cb-4833-9d2b-5c64b5b9f75c",
"status": "Invalid",
"statusSummary": "Archive contains critical validation errors",
"statusCode": 4000,
"archiveFilename": "AppName.zip",
"uploadDate": "2021-08-16T20:01:39Z",
"sha256": "78a71ec70e906480b9817580672b59e4a4c5f7ccb46b292314a6ad4a6c0b1acc",
"ticketContents": null,
"issues": [
{
"severity": "error",
"code": null,
"path": "AppName.zip/AppName.app/Contents/MacOS/AppNameGame",
"message": "The signature of the binary is invalid.",
"docUrl": null,
"architecture": "x86_64"
}
]
}
And our notarization script:
export APPLICATION_NAME=AppName
export APPLICATION_FILE=${APPLICATION_NAME}.app
export APPLICATION_ZIP=${APPLICATION_NAME}.zip
export APPLICATION_ENTITLEMENTS=${APPLICATION_NAME}.entitlements
export APPLICATION_BUNDLE_ID=unity.Dev.AppName
export APPLE_USERNAME=user@name.com
export APPLE_PASSWORD=NOT_A_REAL_PASSWORD
export APPLE_PROVIDER=AppProducer
export APPLE_SIGNATURE="Developer ID Application: AppProducer, Inc. (ABCD123456)"
rm ${APPLICATION_NAME}.zip
codesign --deep --force --verify --verbose --timestamp --options runtime --entitlements ${APPLICATION_ENTITLEMENTS} --sign "${APPLE_SIGNATURE}" "${APPLICATION_FILE}/Contents/Plugins/CustomRulesLib-OSX.bundle/Contents/MacOS/CustomRulesLib-OSX"
codesign --deep --force --verify --verbose --timestamp --options runtime --entitlements ${APPLICATION_ENTITLEMENTS} --sign "${APPLE_SIGNATURE}" "${APPLICATION_FILE}/Contents/Plugins/steam_api.bundle/Contents/MacOS/libsteam_api.dylib"
codesign --deep --force --verify --verbose --timestamp --options runtime --entitlements ${APPLICATION_ENTITLEMENTS} --sign "${APPLE_SIGNATURE}" "${APPLICATION_FILE}/Contents/Plugins/unitypurchasing.bundle/Contents/MacOS/unitypurchasing"
codesign --deep --force --verify --verbose --timestamp --options runtime --entitlements ${APPLICATION_ENTITLEMENTS} --sign "${APPLE_SIGNATURE}" ${APPLICATION_FILE}
zip -q -r ${APPLICATION_ZIP} ${APPLICATION_FILE}
xcrun altool --notarize-app --username ${APPLE_USERNAME} --password ${APPLE_PASSWORD} --asc-provider ${APPLE_PROVIDER} --primary-bundle-id ${APPLICATION_BUNDLE_ID} --file ${APPLICATION_ZIP}