testflightfastlanefastlane-deliverfastlane-pilot

iOS Fastlane deployment (TestFlight) - how to include BETA demo credentials?


We’re starting to use Fastlane for automated deployment, and it’s a very impressive toolset.

One mystery, though: When submitting a BETA build to Apple’s TestFlight, how do you pass in the Demo Account credentials (username and password)? The docs don’t seem to say.

There seem to be a couple of clues here: https://github.com/fastlane/fastlane/blob/master/spaceship/lib/spaceship/test_flight/beta_review_info.rb https://github.com/fastlane/fastlane/blob/master/spaceship/spec/test_flight/app_test_info_spec.rb

And there does seem to be a way to pass in this info for actual App Store submissions: https://github.com/fastlane/fastlane/blob/master/deliver/Deliverfile.md [see app_review_information] ... but not for TestFlight betas.

How do you do the equivalent for BETA uploads?

Thank you very much!


Solution

  • You need to use Appfile, pilot use it like deliver

    Here is the doc. https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform

    My Appfile for ex. is:

    app_identifier ENV["app_identifierEnterprise"] # The bundle identifier of your app
    apple_id ENV["accountAppleId"] # Your Apple email address
    team_name ENV["teamNameEnterprise"]
    team_id ENV["teamIdEnterprise"]
    
    for_platform :ios do
    
        for_lane :releaseBeta do
            app_identifier ENV["app_identifier"]
            apple_id ENV["accountAppleId"]
            team_name ENV["teamName"]
            team_id ENV["teamId"]
        end
    end
    

    I use .env (a file to set this variables), but you just need to replace ENV[""] with "ValueYouWant"

    Hope this helps.