公证电子应用抛出-“您必须首先在线签署相关合同。 (1048)”错误

问题描述 投票:1回答:1

我正在尝试对电子应用程序进行公证,以使其在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:电子公证包抛出相同的错误。

macos electron codesign notarize
1个回答
3
投票

TLDR:检查您的developer.apple.com帐户对您的组织具有管理员权限,然后转到https://appstoreconnect.apple.com/接受法律文档。

我也收到错误消息“错误:您必须首先在线签署相关合同。(1048)”。

导航到developer.apple.com成员资格或其他任何内容都没有提示。原来,我的Apple开发人员帐户在我们组织中没有“管理员”权限,我看不到法律提示,但没有任何迹象表明。

[具有管理员访问权限的团队成员导航到https://appstoreconnect.apple.com/之后,必须接受待处理的协议,并且错误消失了。

UPD。评论建议协议也可以直接在appstoreconnect.apple.com/agreements/#

上查看。
© www.soinside.com 2019 - 2024. All rights reserved.