【问题标题】:xcodebuild exportarchive: "AppStore Profile" is not an "iOS App Development" profilexcodebuild exportarchive:“AppStore 配置文件”不是“iOS 应用程序开发”配置文件
【发布时间】:2020-07-16 16:33:30
【问题描述】:

我正在尝试为 TestFlight 版本构建和导出 IPA。我在 Azure DevOps 托管的 Mac 代理上运行构建管道,因此无法使用自动签名。 (这是一个 Flutter 应用程序,但我不确定这与我遇到的具体问题是否相关)这是在我的构建步骤中发生的:

  1. 我在构建机器上安装了“iPhone Distribution”证书和“AppStore profile”。 (“AppStore 配置文件”是使用 Apple 开发者门户中的“iPhone Distribution”证书生成的)
  2. 运行 Flutter 发布构建,以便生成原生 xcode 构建所需的 xcodeproject 资源。
  3. 在 .xcworkspace 上运行“xcodebuild archive”命令。在我的“project.pbxproj”中为 PBXNativeTarget 的发布配置指定了以下设置:
CODE_SIGN_IDENTITY= "iPhone Distribution: XXXXX PTY LTD (XXXXXXXXXX)";
PROVISIONING_PROFILE_SPECIFIER = "AppStore Profile";

第 3 步成功,** ARCHIVE SUCCEEDED **

  1. 使用“-exportOptionsPlist XcodeTaskExportOptions.plist”运行“xcodebuild -exportArchive”命令。以下是“XcodeTaskExportOptions.plist”的内容:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
      <key>signingStyle</key>
      <string>manual</string>
      <key>teamID</key>
      <string>XXXXXXXX</string>
      <key>signingCertificate</key>
      <string>iPhone Distribution: XXXXX PTY LTD (XXXXXXXXXX)</string>
      <key>provisioningProfiles</key>
      <dict>
        <key>com.myproj.app</key>
        <string>AppStore Profile</string>
        <key>method</key>
        <string>app-store</string>
      </dict>
  </dict>
</plist>

第 4 步失败并出现以下错误:

...Error Domain=IDEProfileQualificationErrorDomain Code=3
"Provisioning profile "AppStore Profile" is not an "iOS App Development" profile."
UserInfo={IDEProfileQualification...

出于某种原因,它抱怨我的“AppStore 个人资料”不是“开发”个人资料。显然,我正在尝试为 TestFlight 版本创建 AppStore IPA,因此我不想使用任何“开发”证书或配置文件。我无法弄清楚我在这里做错了什么。感谢您对此的任何帮助。谢谢!

【问题讨论】:

    标签: ios xcode testflight provisioning-profile xcodebuild


    【解决方案1】:

    好的,我发现了错误。这是由于我在 XcodeTaskExportOptions.plist 中使用了错误的格式。我已将关键“方法”放入“provisioningProfiles”中。它应该移到根级别。

    更正后的 plist:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
        <dict>
          <key>signingStyle</key>
          <string>manual</string>
          <key>method</key>
          <string>app-store</string>
          <key>teamID</key>
          <string>XXXXXXXX</string>
          <key>signingCertificate</key>
          <string>iPhone Distribution: XXXXX PTY LTD (XXXXXXXXXX)</string>
          <key>provisioningProfiles</key>
          <dict>
            <key>com.myproj.app</key>
            <string>AppStore Profile</string>
          </dict>
      </dict>
    </plist>
    

    【讨论】:

      猜你喜欢
      • 2021-10-10
      • 1970-01-01
      • 2011-11-14
      • 1970-01-01
      • 2021-01-28
      • 2023-04-10
      • 1970-01-01
      • 2018-03-25
      • 1970-01-01
      相关资源
      最近更新 更多