Notarize a macOS app from the command line
npm install @chinilla/notarize-cliNotarize a macOS app from the command line.
This tool is a wrapper for xcrun altool and xcrun stapler and is intended for use in a continuous integration (CI) environment. Requires Xcode.
Supports notarizing app packages, disk images, and zip files.
``sh`
npx notarize-cli --file build/$PRODUCT_MODULE_NAME.dmg \
--bundle-id $PRODUCT_BUNDLE_IDENTIFIER \
--username $NOTARIZE_USERNAME \
--password $NOTARIZE_PASSWORD
`sh-session
$ npx notarize-cli --help
Notarize a macOS app from the command line
USAGE
$ notarize-cli
OPTIONS
-h, --help show CLI help
-v, --version show CLI version
--asc-provider=asc-provider asc provider to use for app notarization
--bundle-id=bundle-id (required) bundle id of the app to notarize
--file=file (required) path to the file to notarize
--no-staple disable automatic stapling
--password=password (required) password to use for authentication
--username=username (required) username to use for authentication
`
Some options may be passed as environment variables.
- NOTARIZE_PASSWORD: password to use for authenticationNOTARIZE_USERNAME
- : username to use for authenticationPRODUCT_BUNDLE_IDENTIFIER
- : bundle id of the app to notarize
Installation is unnecessary when you run the command using npx, but you can install it if you wish:
`sh`
npm install -g notarize-cli
1. Runs xcrun altool --notarize-app.xcrun altool --notarization-info
1. Runs in a loop until the notarization status changes.xcrun stapler staple` if notarization is successful.
1. Runs