我已经通过命令行为我正在为其开发插件的Mac应用程序公证了一个插件。该插件旨在在Mac应用商店之外分发。
xcrun altool --notarize-app --primary-bundle-id "com.demo.bundle.id" --username "email@abc.com" --password "xxx-x-xxxx-xx" --file Plugin.zip
收到一封已成功公证的电子邮件,其中有instructions条有关如何导出以进行分发的电子邮件。但是,这是针对XCode UI的指令,但是我通过命令行进行了公证,因此该指令不适用于我。是否存在用于下载经过公证的文件(Plugin.zip
)的命令行,或者如何从Apple获取Plugin.zip
文件以将其分发到我的网站上?
更新:
结果是您不能对.zip文件进行公证,但是无法装订它。因此,我决定创建一个.pkg来分发我的插件,而不是通过zip文件分发。
这是我成功完成公证并装订插件的步骤,可以说我的插件名称为FileConvertor.PluginExtension
- 对您的二进制文件进行代码签名,以将其包含在安装程序中。
codesign --sign "Developer ID Application: Developer Name" --verbose=4 --deep --force --strict FileConvertor.PluginExtension
- 创建安装程序(.pkg),添加上面签名为
.PluginExtension
的代码 - 现在使用安装程序证书对安装程序进行签名。
productsign --sign "Developer ID Installer: Developer Name" ./FileConvertor.pkg ./FileConvertorSigned.pkg
- 发送签名的安装程序以进行公证
xcrun altool --notarize-app --primary-bundle-id "com.demo.plugin" --username xyz@abc.com" --password "xxxx-xxxx-xxxx-xxxx" --file FileConvertorSigned.pkg
- 如果经过公证成功,则装订安装程序
xcrun stapler staple FileConvertorSigned.pkg
- 在网络上分发安装程序