Developer ID Installer

1.先給.app應(yīng)用 archive 用Developer ID證書和pp文件簽名,通過Xcode傳上去notarize

2.用package軟件打包.app生成.pkg文件;用當(dāng)前開發(fā)賬號持有者的賬號登錄developer.apple.com生成Developer ID Installer證書,安裝證書,用productsign命令和Developer ID Installer證書給.pkg包簽名

productsign --timestamp --sign "Developer ID Installer Cert" "/path/needSign.pkg"  "/path/signed.pkg"

3.將簽名后的.pkg包用命令行上傳到蘋果服務(wù)進(jìn)行認(rèn)證,這里用普通開發(fā)者賬號生成一個app-specific-password跳過two-factor-authentification ; 認(rèn)證成功后開發(fā)者郵箱會收到一封郵件表明成功

成功后無需再對這個包做什么,用戶從網(wǎng)絡(luò)下載這個.pkg的安裝包,其電腦上的gatekeeper會像蘋果服務(wù)器請求獲取這個包的notarize情況,過了就表明這是個受認(rèn)證的開發(fā)者。

可能用到的命令

spctl -a -v xxx.pkg //查看app notarize情況
xcrun stapler staple xxx.pkg //感覺這個命令好像沒有作用 說的是把ticket打入到包

xcrun altool --notarize-app --primary-bundle-id "installer pkg bundleID" --username "developerAccount" --password "app-specific-password" --file "/path/xxx.pkg" //這個命令可能過時最好用下面這個
xcrun notarytool submit  --apple-id "Developer Account " --password "app specific password" --team-id "XXXXXXX"  "/path/xxx.pkg"
這個命令成功會返回一個RequestUUID
No errors uploading '/path/xxx.pkg'.
RequestUUID = 99c29d9e-7086-424e-af81-eb1eb7dh9f06 //根據(jù)這個RequestUUID可以后續(xù)查詢一些信息
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容