【问题标题】:Fastlane with multiple certificates具有多个证书的 Fastlane
【发布时间】:2021-11-10 23:54:33
【问题描述】:

假设我们有两个有效证书和两个对应的配置文件用于单个应用程序。

假设我们出于与问题无关的原因需要此设置。

我们如何使用 fastlane / fastlane match 根据一些附加条件(在 fastfile 中指定)使用一个或另一个?

【问题讨论】:

    标签: ios fastlane fastlane-match fastlane-gym


    【解决方案1】:

    证书/配置文件可以通过app idbuild schemes映射,它们以release命名,或者自定义名称,如appStoreappStore_forAappStore_forB

    我有一个应用程序,有 2 个不同的 app id。例如,app_Aapp_B。我通过构建方案来区分它们。一个是appStore_A,另一个是appStore_B

    在我的fastlane 文件中,它喜欢关注。

    // For build app_A, and upload to TestFlight.
    lane: app_A do
      api_key = app_store_connect_api_key( /* for `pilot` auth */)
    
      match(type: "appstore", readonly: true, git_url: "ooxx@match.storage")       
    
      gym(
         clean: true,
         scheme: "appStore_A",
         configuration: "AppStore",
         workspace: "app.xcworkspace",
      )
    
      pilot(
         app_identifier: "com.app_A",
         api_key: api_key
      )
    end
    
    // For build app_B, and upload to TestFlight.
    lane: app_B do
      api_key = app_store_connect_api_key( /* for `pilot` auth */)
    
      match(type: "appstore", readonly: true, git_url: "ooxx@match.storage")       
    
      gym(
         clean: true,
         scheme: "appStore_B",
         configuration: "AppStore",
         workspace: "app.xcworkspace",
      )
    
      pilot(
         app_identifier: "com.app_B",
         api_key: api_key
      )
    end
    

    app_Aapp_B使用相同的app.xcworkspace,但它们在不同的scheme和不同的应用程序target中。

    【讨论】:

    • 我想在做出这个决定时避免对 Xcode 文件的任何依赖。所以我有相同的应用 ID、相同的方案等,但我有两个不同的证书和两个不同的 prov 配置文件(带有名称),并且想根据一些外部标准在它们之间进行选择。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-07-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-04-07
    • 2021-04-30
    • 1970-01-01
    相关资源
    最近更新 更多