Mac app Notarized 公证 (Command Line)包含自动脚本 (pkg)

This blog outlines the notarization process for Mac apps using command line tools, emphasizing the importance of notarizing through Xcode. It details steps like identifying the asc-provider, uploading the app, and retrieving a UUID for status tracking. The post also provides a script for adding notarization information to DMGs, ensuring usability in offline environments." 98073667,6675324,前端开发:内存泄漏检测与分析,"['前端开发', 'JavaScript', '内存管理', 'DOM', '调试']

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Notarized 基本流程

重要介绍kpg的公证过程,App可直接在xcode中公证。

  1. 查看asc-provider

    xcrun altool --list-providers -u "appid" -p "pwd"
    

    这里的password不是appid的password。
    获取途径

  2. 上传应用

    xcrun altoor --notarize-app \
                 --primary-bundle-id "bundle-id" \
                 --username "appid" \
                 --asc-provider "provider" \
                 --password "pwd" \
                 --file "filePath"
    

    primary-bundle-id: 不是app的bundleid,是标识这个notarize上传文件的bundleid,自定义即可。
    asc-provider: 通过1查询的结果填写,如果没有可以省略。

    上传成功后会返回一串UUID,通过UUID可以查询上传文件notarize的审核结果。

  3. 查看notarized审核结果

    xcrun altool --notarization-info "uuid" \
                 --username "appid" \
                 --password "pwd"
    

    --notarization-info:为2反馈的UUID。

    查看反馈的Status,如果失败通过LogFileURL查看错误信息。

  4. 给dmg添加公正信息(为了用户在离线环境也可以使用,联网的情况下Gatekeeper finds the ticket online

    xcrun stapler staple "filePath"
    
  5. 脚本如下

    #!/bin/sh
    NOTRAIZED_FIL
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值