如何为 XCode Cloud 构建设置 TestFlight 测试注释?

Ale*_*sky 20 xcode continuous-integration ios

默认情况下,Xcode Cloud 工作流程不提供 TestFlight 上传的测试注释。我想要带有 git commit 消息和 git commit 哈希的字符串,而不是“无测试注释”消息。

是否可以?

testflight - 没有测试说明 - Xcode Cloud build

小智 0

据我所知有两种方法:

  1. 在 App Store Connect 中手动设置测试详细信息。不幸的是,如果您使用 Xcode Cloud 分发构建,它们将在您有机会设置测试详细信息之前分发。
  2. 使用Fastlane 的 Pilot和 Fastfile 通道来设置它们,例如:
build_number = latest_testflight_build_number
testflight(
    app_version: "1.0.0",
    build_number: build_number,
    groups: ["Your external testing group"],
    distribute_external: true,
    distribute_only: true,
    changelog: "We changed something in this build"
)
Run Code Online (Sandbox Code Playgroud)

重要由于 Xcode Cloud 自动增加内部版本号,您必须使用latest_testflight_build_number.

请注意,fastlane 将“测试详细信息”称为“更改日志”,有时也称为“测试注释”,但在 ASC 上它们是“测试详细信息”。