What is the proper syntax at the command line for uploading a package for notarization

In my keychain I have my developer ID listed under "Name" as

Developer ID Installer: My Name (XXXXXX7RBW),

where I've replaced the first six digits with XXXXXX

I then built my package using

productbuild --sign 'Developer ID Installer: MyName (XXXXXX7RBW)' --component '/Users/Desktop/dist/main_app.app' /Applications /Users/Desktop/dist/main_app.pkg

The package appeared where it should, so I then proceeded to the signing:

productsign --sign 'Developer ID Installer: MyName (XXXXXX7RBW)' /Users/Desktop/dist/main_app.pkg /Users/Desktop/dist/main_app_signed.pkg

Everthing seemed to proceed smoothly, and I observed main_app_signed.pkg appeared where it should.

The uploading is where I'm a bit confused:

xcrun altool --notarize-app -f /Users/Desktop/dist/main_app_signed.pkg --primary-bundle-id XXXXXX7RBW -u myemail-p'@keychain:Developer ID Application: MyName (XXXXXX7RBW)'

I was then asked for my password. I assume this is my Apple developer's, which I entered. The error message stated,

"Unable to upload your app for notarization. Failed to get authorization for username 'myemail' and password."

What am I missing here?

I neglected to generate an app-specific password by visiting https://appleid.apple.com/ and using that password when uploading for notarization.

I neglected to generate an app-specific password

So, once you had an app-specific password, did things work? If so, cool. However, I encourage you switch from altool to notarytool. The former has been deprecated for the purposes of notarisation (although it’s still fine to use it for other purposes). Also, notarytool is better, stronger, and faster, so it’s well worth making the switch.

For more background on this, see WWDC 2021 Session 10261 Faster and simpler notarization for Mac apps.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

What is the proper syntax at the command line for uploading a package for notarization
 
 
Q