我正在尝试对电子应用程序进行公证,以使其在 macOS Catalina 上运行。打包成功但xcrun altool
命令抛出“您必须先在线签署相关合同。(1048)”错误。
电子应用 package.json 内容:
"mac": {
"entitlements": "./build/entitlements.mac.inherit.plist",
"hardenedRuntime": true,
"type": "distribution",
"category": "public.app-category.productivity",
"icon": "build/icon.icns",
"target": [
"dmg",
"zip"
]
},
"dmg": {
"sign": false,
entitlements.mac.inherit.plist 文件:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.application-identifier</key>
<string><app.bundle.name></string>
<key>com.apple.developer.team-identifier</key>
<string><TEAMID></string>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.application-groups</key>
<array>
<string><app.bundle.name></string>
</array>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.inherit</key>
<true/>
</dict>
</plist>
我运行了https://stackoverflow.com/a/53121755中提到的命令
xcrun altool --notarize-app -f App.dmg --primary-bundle-id app.bundle.name -u <username> -p <app-specific-password>
它是抛出您必须首先在线签署相关合同。(1048)错误。我无法继续进行应用签名。帮助!
ps:电子公证包抛出同样的错误。
自从我问这个问题已经两年了,我不得不为自己的问题添加书签,只是因为 Apple 一直在用如此频繁的政策变化来烦扰开发人员。