【问题标题】:How do I distribute a build to external testers via Fastlane?如何通过 Fastlane 将构建分发给外部测试人员?
【发布时间】:2019-09-11 18:22:30
【问题描述】:

我有一个执行 uploadToTestFlight 操作的 Fastfile:

uploadToTestflight(
  username: "foo@example.com",
  skipWaitingForBuildProcessing: false,
  distributeExternal: true)

当我运行它时,它成功了。但是,它实际上并没有将构建分发给任何人。当我在 App Store Connect > My Apps > Foo App > TestFlight > iOS 查看构建时,它在构建名称附近显示“已批准”,这意味着它已经通过了审核过程。

但是,当我单击构建时,我注意到它发布到的唯一组或用户是 App Store Connect Users,这意味着它实际上并没有从外部发布。

我有一个名为 Foo Group 的组,我想在运行 fastlane 时将其发布到该组。我该怎么做?

我尝试通过documentation for Pilot 解决,但它没有外部分发的示例。

【问题讨论】:

    标签: fastlane app-store-connect fastlane-pilot


    【解决方案1】:

    在 GitHub 上的Fastlane repo 中,我在pilot/lib/pilot/build_manager.rb 中找到了这段代码

    if options[:distribute_external] && options[:groups].nil?
      # Legacy Spaceship::TestFlight API used to have a `default_external_group` that would automatically
      # get selected but this no longer exists with Spaceship::ConnectAPI
      UI.user_error!("You must specify at least one group using the `:groups` option to distribute externally")
    end
    

    我猜你在 Fastlane 运行的输出中没有注意到这个无声警告。是否指定了groups 参数?

    如果您完全自动进行外部发布,则值得指定 changelog 参数。

    【讨论】:

    • 相信这是正确的答案。我对 OP 的评论感到困惑我运行它时成功了。 但是 - 如果未指定 groups,那么该命令将失败,而不是成功。
    • 你应该像groups: ["Foo Group"]这样指定组
    • 在这种情况下,fastlane 存在一个问题。如果该测试组已存在,则将添加测试人员。如果没有,Fastlane 将给出成功消息,但不会创建新组,也不会明显添加测试人员。任何帮助:github.com/fastlane/fastlane/issues/16198
    【解决方案2】:
    optional_changelog = %Q{
      Your changelog
    }
    
    upload_to_testflight(
        ...
        changelog: optional_changelog,
        distribute_external: true,
        distribute_only: true, // false if you want to upload ipa
        groups: [
            "Your group",
            "Your other group"
        ],
        skip_submission: false, // defaults to false if not specified
        skip_waiting_for_build_processing: false, // defaults to false if not specified
    )
    

    【讨论】:

    • 这行得通吗?我无法将我的应用上传到外部群组
    • 控制台提示我必须上传 Ipa。是否可以在不上传 IPA 的情况下上传到外部组?
    • 尝试使用distribute_only: true
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-02-08
    相关资源
    最近更新 更多