11

I have a Fastfile that performs the uploadToTestFlight action:

uploadToTestflight(
  username: "foo@example.com",
  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.

Senseful
  • 86,719
  • 67
  • 308
  • 465

3 Answers3

6

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.

balazs630
  • 3,421
  • 29
  • 46
  • Believe this is the correct answer. I’m confused by OP’s comment _This succeeded when I ran it._ though - if `groups` was unspecified then the command would fail, not succeed. – Aaron Brager Sep 15 '19 at 18:43
  • 6
    You should specify the group like `groups: ["Foo Group"]` – Senseful Sep 17 '19 at 17:51
  • There is one issue with fastlane in this case. If that test group already exists, the tester will be added. If not, Fastlane will give the success message but that new group won't be created and the tester won't be added obviously. Any help here: https://github.com/fastlane/fastlane/issues/16198 – nr5 Mar 24 '20 at 07:34
6
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
)
Ted
  • 22,696
  • 11
  • 95
  • 109
0

FTR I was having issues uploading to a external group and the issue is that skip_waiting_for_build_processing needs to be set to false.

So ensure that you have the follow params set

 distribute_external: true,
 groups: ['Name of your group'],
 skip_submission: true,
 notify_external_testers: true,
 skip_waiting_for_build_processing: false,

https://docs.fastlane.tools/actions/testflight/#Parameters