关于electron应用mac公证问题

编程入门 行业动态 更新时间:2024-10-07 12:23:25

关于<a href=https://www.elefans.com/category/jswz/34/1771365.html style=electron应用mac公证问题"/>

关于electron应用mac公证问题

对于 Electron 应用,它有 electron-notarize 的工具来做公证。但遗憾的是,我使用的时候出现了各种各样的报错,相关GitHub issue上也发现有人出现跟我类似的问题,不过没有明确的解决办法。

折腾半天,决定用原始的办法来解决——命令行工具。

一句命令

xcrun altool --notarize-app --primary-bundle-id “com.xxx.xxx" --username “your developer appleid" --password “app-password" --asc-provider "ProviderShortname" -t osx --file xxx.dmg

primary-bundle-id: 自己app的bundle id。

username:苹果开发者ID。

password:应用专用密码。(登录appleid.apple,然后找到创建app password的地方,创建一个应用专用密码,这样可以避免暴露真实的密码。)

asc-provider:证书提供者。查询命令如下:

xcrun altool --list-providers -u "apple id" -p "app password”

公证成功是这样的

No errors uploading 'xxx.xxx'.
RequestUUID = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

显示所有上传到苹果的包

xcrun altool --notarization-history 0 -u "appid" -p "app_password"

查单个记录。里面有日志,公证失败可查看

xcrun altool --notarization-info bfd6682e-49bc-4e82-ba8f-cdf0e8668502 -u "appid" -p "app_password"

参考文献:Mac Electron 应用的签名(signature)和公证(notarization)

更多推荐

关于electron应用mac公证问题

本文发布于:2024-02-13 20:29:48,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1760544.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:electron   mac

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!