Notarized 基本流程
重要介绍kpg的公证过程,App可直接在xcode中公证。
-
查看asc-provider
xcrun altool --list-providers -u "appid" -p "pwd"
这里的password不是appid的password。
获取途径 -
上传应用
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的审核结果。
-
查看notarized审核结果
xcrun altool --notarization-info "uuid" \ --username "appid" \ --password "pwd"
--notarization-info
:为2反馈的UUID。查看反馈的
Status
,如果失败通过LogFileURL
查看错误信息。 -
给dmg添加公正信息(为了用户在离线环境也可以使用,联网的情况下
Gatekeeper finds the ticket online
)xcrun stapler staple "filePath"
-
脚本如下