Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xcodebuild to notarize mac app and wait for response?

I heavily rely on xcodebuild to automate the build process. Developers can now notarize their mac Developer ID apps before distribution, in Xcode 10.

I realize notarisation is an asynchronous process, one which involves waiting for Apple to 'review' and approve the app. In practice this seems to take less than 5 to 10 minutes.

Has anyone been able to automate this using the command line so we don't have to touch or use the Xcode Archiver Window? I cannot find a way. There seems to only be a -exportNotarizedApp option, which presumably only works if you already have the app notarised. No way to request notarization using the command line?

like image 684
strangetimes Avatar asked Mar 17 '26 15:03

strangetimes


1 Answers

An asynchronous notarization process can be automated using a new tool from Xcode toolchain named altool. You can read its documentation by running xcrun altool in the Terminal.

P. S. I wrote a blog post with a working script, if this helps.

like image 192
Vadim Avatar answered Mar 20 '26 10:03

Vadim



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!