22

我正在尝试对电子应用程序进行公证,以使其在 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 一直在用如此频繁的政策变化来烦扰开发人员。

4

2 回答 2

47

TLDR:有两个地方可能需要签订合同。检查这些 URL:


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

导航到 developer.apple.com 会员或其他任何内容都没有显示提示。事实证明,我的 Apple 开发者帐户在我们的组织中没有“管理员”权限,我看不到法律提示,但没有任何迹象表明这一点。

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

升级版。评论建议也可以在https://appstoreconnect.apple.com/agreements/#上直接查看协议

于 2019-10-15T13:25:10.430 回答
5

您还可以导航到https://developer.apple.com/account/#/overview/ {companyid}

顶部将提示您同意更新的许可协议。如果您没有权限,将会有一个按钮生成一封电子邮件,其中包含有权限的人的链接。

于 2019-11-13T07:59:58.613 回答