【问题标题】:Exporting a Developer-ID-signed app bundle with Xcode 9使用 Xcode 9 导出 Developer-ID 签名的应用程序包
【发布时间】:2017-11-20 23:12:15
【问题描述】:

我正在尝试从 Xcode 9.1 上的机器人中的构建后触发器中导出 Developer-ID 签名的应用程序包,但我无法让它通过 Gatekeeper 而无需使用右键单击- Finder 内解决方法。

按照this answer 的建议,我尝试运行codesign -dvv /path/to/my.app 并得到此输出(服务器和团队ID 已被*删除):

Executable=/path/to/my.app/Contents/MacOS/myapp
Identifier=com.abbey-code.myapp
Format=app bundle with Mach-O thin (x86_64)
CodeDirectory v=20200 size=29403 flags=0x0(none) hashes=911+5 location=embedded
Signature size=4630
Authority=Mac Developer: OS X Server (**********)
Authority=Apple Worldwide Developer Relations Certification Authority
Authority=Apple Root CA
Signed Time=Nov 20, 2017, 5:48:21 PM
Info.plist entries=35
TeamIdentifier=**********
Sealed Resources version=2 rules=13 files=141
Internal requirements count=1 size=184

上面的答案表明我应该看到Developer ID Certification Authority,但我只看到“Mac Developer”作为根权限。我正在使用这些参数调用 xcodebuild:

xcodebuild -verbose -exportArchive -exportOptionsPlist exportOptions.plist -archivePath, /path/to/xcarchive, -exportPath, /path/to/place/exported/appbundle

我的 exportOptions.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>method</key>
    <string>mac-application</string>
    <key>signingCertificate</key>
    <string>Developer ID Application</string>
    <key>signingStyle</key>
    <string>automatic</string>
</dict>
</plist>

我的机器人已登录到我的开发者帐户,并设置为自动管理证书。我还尝试在服务器上启动 Xcode,登录我的帐户,下载开发者 ID 证书,然后单击 Edit Bot 表中的“添加到服务器”按钮。

我做错了什么?

【问题讨论】:

    标签: xcode macos code-signing xcodebuild xcode-bots


    【解决方案1】:

    我的导出选项列表不正确。我能够成功使用以下内容:

    <?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>method</key>
        <string>developer-id</string>
        <key>signingStyle</key>
        <string>automatic</string>
    </dict>
    </plist>
    

    我可以确认,需要在 Bot 配置中手动将开发者 ID 证书添加到服务器才能正常工作。出于某种原因,它不会自动获取那个。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-11-19
      • 1970-01-01
      • 2016-02-22
      • 2013-12-26
      • 2018-04-14
      • 1970-01-01
      • 2013-03-15
      • 2018-07-14
      相关资源
      最近更新 更多