I have successfully notarized a plugin via command line for a Mac application i'm developing plugins for. This plugin is intended for distribution outside of Mac appstore.
xcrun altool --notarize-app --primary-bundle-id "com.demo.bundle.id" --username "email@abc.com" --password "xxx-x-xxxx-xx" --file Plugin.zip
Got an email that it has been successfully notarized and the email has instructions on how to export for distribution. However, it's an instruction for XCode UI but I did the notarization via command line so the instructions doesn't apply for me. Is there a commandline to download the notarized file(Plugin.zip
) or else how do I get the Plugin.zip
file from Apple to distribute it on my website?
UPDATE:
Turns out you can notarize a .zip file but you can't staple it. So I decided to create a .pkg to distribute my plugin instead of distributing via a zip file.
Here's the steps I followed to successfully notarize and staple my plugin, lets say my plugin name is FileConvertor.PluginExtension
- Code sign your binaries to be included in your installer.
codesign --sign "Developer ID Application: Developer Name" --verbose=4 --deep --force --strict FileConvertor.PluginExtension
- Create your installer (.pkg) adding the above code signed
.PluginExtension
- Now sign your installer with the installer certificate.
productsign --sign "Developer ID Installer: Developer Name" ./FileConvertor.pkg ./FileConvertorSigned.pkg
- Send the signed installer for notarization
xcrun altool --notarize-app --primary-bundle-id "com.demo.plugin" --username xyz@abc.com" --password "xxxx-xxxx-xxxx-xxxx" --file FileConvertorSigned.pkg
- If sucessfully notarized, staple your installer
xcrun stapler staple FileConvertorSigned.pkg
- Distribute your installer on the web