Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I distribute a build to external testers via Fastlane?

I have a Fastfile that performs the uploadToTestFlight action:

uploadToTestflight(
  username: "[email protected]",
  skipWaitingForBuildProcessing: false,
  distributeExternal: true)

This succeeded when I ran it. However, it didn't actually distribute the build to anyone. When I look at the build on App Store Connect > My Apps > Foo App > TestFlight > iOS, it says "Approved" near the build name, which implies that it already went through the review process.

However, when I click on the build, I notice that the only groups or users to which it was released to is App Store Connect Users, meaning it wasn't actually externally released.

I have a group named Foo Group which I would like to release it to whenever I run fastlane. How do I do that?

I tried resolving via the documentation for Pilot but it doesn't have an example with distributing externally.

like image 593
Senseful Avatar asked Sep 11 '19 18:09

Senseful


2 Answers

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
)
like image 84
Ted Avatar answered Nov 04 '22 08:11

Ted


In the Fastlane repo on GitHub, I found this code in 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

My guess is that you didn't notice this silent warning in the output of your Fastlane run. Did you specify the groups parameter?

Also it's worth to specify the changelog param if you're doing the external releases fully automatically.

like image 41
balazs630 Avatar answered Nov 04 '22 09:11

balazs630