Mac Sign and Notarize
Prepare the entitlements file
- Copy
base.entitlementsinto your build folder
(Located in the Documents folder on the Mac Mini)\ - Rename it to match your app (e.g.
CopperCorp.entitlements)
Sign the app
Open Terminal, cd into the build folder, and run:
codesign --deep --force --verify --verbose --timestamp --options runtime --entitlements "{name}.entitlements" --sign "Developer ID Application: Terrahutton AB (793U5AWV3W)" "{name}.app"
Zip the app
Use the following command to preserve metadata:
ditto -c -k --sequesterRsrc --keepParent "{name}.app" "{name}.zip"
Submit for Notarization
xcrun notarytool submit "{name}.zip" --keychain-profile "TerrahuttonProfile" --wait
(The TerrahuttonProfile is setup on the Mac Mini)
Staple Ticket
Attach the ticket to the app:
xcrun stapler staple "{name}.app"
Upload the app
Delete the old zip you used for submission and run the ditto command
again on the stapled app:
ditto -c -k --sequesterRsrc --keepParent "{name}.app" "{name}.zip"
Verify the app (Optional)
Run the following command if you want to make sure you have done everything correctly:
xcrun stapler validate "{name}.app"