【问题标题】:Why does provisioning profile need to be set to distribution for both debug and release?为什么需要将配置文件设置为用于调试和发布的分发?
【发布时间】:2019-10-15 21:57:13
【问题描述】:

我正在尝试通过 CircleCI 上的 fastlane 构建我的 react 本机应用程序。我正在使用 match 来管理证书/配置文件并使用这些指南:

fastlane ios beta 在本地工作。

然而,在 CI 上,我发现安装程序无法构建,并出现以下错误:

错误:找不到与“match Development app.my”匹配的团队“...”的配置文件:Xcode 找不到任何匹配“.../match Development app.my”的配置文件。安装配置文件(通过将其拖放到 Xcode 的停靠项上)或在目标编辑器的 Signing & Capabilities 选项卡中选择不同的配置文件。 (在项目“MyApp”的目标“MyApp”中)`

我觉得这很奇怪,因为我没有使用开发配置文件进行构建,而是使用 distribution 配置文件。这在调用 match/gym 时在构建输出中得到确认,其中没有提及开发配置文件。

在 Xcode 中,在“签名和功能”下,我按照上述指南“自动管理签名”未勾选,“调试”设置为使用开发配置文件,“发布”设置为使用分发配置文件。

在“调试”部分下将配置文件更改为“发布”是修复我的 CI 构建的原因,但这是为什么呢?我的调试版本肯定应该始终使用开发证书吗?

【问题讨论】:

    标签: ios react-native circleci fastlane fastlane-match


    【解决方案1】:

    我在 iOS 版本中遇到了类似的问题,最后意识到我需要将 Xcode 中的配置文件与我的 Fastfile 中的配置文件相匹配:

    lane :beta do
      begin
        build_number = increment_build_number(...)
        slack(message: "Starting new build " + build_number)
    
        *** match(type: "appstore") ***
    
        build_app(
          ...
    
          *** export_method: "app-store", ***
    
          build_path: "./builds",
          output_directory: "./builds"
        )
        upload_to_testflight(
          skip_waiting_for_build_processing: true
        )
    
        slack(
          message: "App successfully published to TestFlight"
        )
    
      end
    

    Match 会将所需的配置文件下载到机器上,但如果 Xcode 中的“Provisioning Profile”(在 Build Settings -> Signing 中找到)与 Fastfile 不匹配,Xcode 将无法从 Match 中获得所需的配置文件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-08-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-02-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多