I am working on notarizing my installer using notarytool, below is my command
submission_id=$(xcrun notarytool submit --apple-id "${APPLE_ID}" --team-id "${TEAM_ID}" --password "${APP_PASSWORD}" "${dmgFile}" 2>&1)
Next I want to check the status using notarytool info
status=$(xcrun notarytool info "${submission_id}" --apple-id "$APPLE_ID" --password "$APP_PASSWORD" 2>&1)
However, I get submission_id as below.
Conducting pre-submission checks for file_name.dmg and initiating connection to the Apple notary service... Submission ID received id: submission_id Successfully uploaded file id: submission_id path: file_path/file_name.dmg
How can I extract submission_id in the form of UUID which I can use to get notarization status using notary info
I had the same problem when I had to work on the Notarization via CI/CD. At the moment I'm writing the notarytool's output is similar to:
You can use the
awk
command to clean and retrieve only the id from the notary output:In my case the result was:
N.B.: When using echo ensure to wrap your variable into double-quote to preserve line-breaks:
echo "$NOTARY_SUBMIT_OUTPUT"