• Home
  • Insight
  • Blog
  • Business
  • Entertainment
  • Health
  • Politics
  • Shop
    • Gift Shop
    • Value Shop
    • Store
    • Bargain Shop
    • Discount
  • Sports
  • Tech
  • Travel
  • USA
  • Video
  • World
    • Asia
    • Africa
    • South America
    • North America
    • Europe
    • Oceania
Tuesday, November 17, 2026
No Result
View All Result
Subscribe Now
  • Home
  • Insight
  • Blog
  • Business
  • Entertainment
  • Health
  • Politics
  • Shop
    • Gift Shop
    • Value Shop
    • Store
    • Bargain Shop
    • Discount
  • Sports
  • Tech
  • Travel
  • USA
    Stranded in Conflict: Palestinians Navigate the Tenuous Balance of War and Peace Amid Ceasefire Efforts

    Stranded in Conflict: Palestinians Navigate the Tenuous Balance of War and Peace Amid Ceasefire Efforts

    Trump Administration Revokes Pay Increase for Head Start Educators

    Trump Administration Revokes Pay Increase for Head Start Educators

    Unexpected Triumph: Gay Candidates Achieve Unforeseen Victories in Challenging Races

    Unexpected Triumph: Gay Candidates Achieve Unforeseen Victories in Challenging Races

    Microsoft Outlook Experiences Prolonged Outage Affecting Users Nationwide

    Microsoft Outlook Experiences Prolonged Outage Affecting Users Nationwide

    Gunfire Erupts in D.C.: Authorities Search for Suspect Amid Rising Concerns Over Public Safety

    Gunfire Erupts in D.C.: Authorities Search for Suspect Amid Rising Concerns Over Public Safety

    LAUSD Takes Strong Action Against Hate Speech Following Racial Slur Incidents

    LAUSD Takes Strong Action Against Hate Speech Following Racial Slur Incidents

    Beloved Former Los Angeles Times Columnist Steve Harvey Passes Away at 80

    Beloved Former Los Angeles Times Columnist Steve Harvey Passes Away at 80

    Exploring Diversity: ‘Ten Lives’ Showcases the Varied Economic Journeys of Americans

    Exploring Diversity: ‘Ten Lives’ Showcases the Varied Economic Journeys of Americans

    Philadelphia Eagles Facing Turmoil as Coach Nick Sirianni Addresses Controversy Over Gesture to Fans

    Philadelphia Eagles Facing Turmoil as Coach Nick Sirianni Addresses Controversy Over Gesture to Fans

  • Video
  • World
    • Asia
    • Africa
    • South America
    • North America
    • Europe
    • Oceania
The Insight Post
  • Home
  • Insight
  • Blog
  • Business
  • Entertainment
  • Health
  • Politics
  • Shop
    • Gift Shop
    • Value Shop
    • Store
    • Bargain Shop
    • Discount
  • Sports
  • Tech
  • Travel
  • USA
    Stranded in Conflict: Palestinians Navigate the Tenuous Balance of War and Peace Amid Ceasefire Efforts

    Stranded in Conflict: Palestinians Navigate the Tenuous Balance of War and Peace Amid Ceasefire Efforts

    Trump Administration Revokes Pay Increase for Head Start Educators

    Trump Administration Revokes Pay Increase for Head Start Educators

    Unexpected Triumph: Gay Candidates Achieve Unforeseen Victories in Challenging Races

    Unexpected Triumph: Gay Candidates Achieve Unforeseen Victories in Challenging Races

    Microsoft Outlook Experiences Prolonged Outage Affecting Users Nationwide

    Microsoft Outlook Experiences Prolonged Outage Affecting Users Nationwide

    Gunfire Erupts in D.C.: Authorities Search for Suspect Amid Rising Concerns Over Public Safety

    Gunfire Erupts in D.C.: Authorities Search for Suspect Amid Rising Concerns Over Public Safety

    LAUSD Takes Strong Action Against Hate Speech Following Racial Slur Incidents

    LAUSD Takes Strong Action Against Hate Speech Following Racial Slur Incidents

    Beloved Former Los Angeles Times Columnist Steve Harvey Passes Away at 80

    Beloved Former Los Angeles Times Columnist Steve Harvey Passes Away at 80

    Exploring Diversity: ‘Ten Lives’ Showcases the Varied Economic Journeys of Americans

    Exploring Diversity: ‘Ten Lives’ Showcases the Varied Economic Journeys of Americans

    Philadelphia Eagles Facing Turmoil as Coach Nick Sirianni Addresses Controversy Over Gesture to Fans

    Philadelphia Eagles Facing Turmoil as Coach Nick Sirianni Addresses Controversy Over Gesture to Fans

  • Video
  • World
    • Asia
    • Africa
    • South America
    • North America
    • Europe
    • Oceania
No Result
View All Result
No Result
View All Result
Home Mobile

Deploying Flutter app to Firebase App Distribution using Fastlane

by Theinsightpost
August 15, 2022
in Mobile
0 0
0
Deploying Flutter app to Firebase App Distribution using Fastlane


Written by Souvik Biswas

In this article, I will be showing how to set up and deploy your Flutter app to Firebase App Distribution with the help of fastlane.

What is fastlane?

Fastlane is an open source continuous delivery (CD) tool that helps to automate the building and deployment of Android and iOS apps to Play Store and App Store. You can customize the lanes as you need and they also help you to automate the code signing process for both platforms.

Fastlane also has CD support for Flutter apps, though you need to set it up separately for Android and iOS platforms.

What is Firebase App Distribution?

Firebase App Distribution makes it easy to distribute pre-release apps to testers so that you can get feedback from the early users quickly. It can also be combined with Crashlytics which will give you reports about any crash that occurs on the tester’s device.

Combining Firebase App Distribution with fastlane makes automated distribution even more seamless.

Now, let’s look into the setup process of fastlane and integrate Firebase App Distribution with it.

Install Firebase CLI

You will need Firebase Command-Line interface tool in order to communicate with Firebase with the help of fastlane from your terminal directly.

  1. For installing Firebase CLI, just run the following command from the terminal:

    curl -sL https://firebase.tools | bash
    
  2. Then log in to Firebase to get access to your Firebase projects:

    This command will open a webpage from where you can log in to Firebase using your Google account.

    You will get a confirmation message after a successful login to Firebase CLI.

Install fastlane

To install fastlane using RubyGems, just run this command from the terminal:

sudo gem install fastlane -NV

Alternatively, you can also use this command to install it using Homebrew:

Set up fastlane for Android

Navigate to the Android directory (FlutterProj/android/) of your Flutter project, and initialize fastlane using the following command:

After running this command, it will ask for two things:

  1. Package name
  2. Secret JSON file location

Both of them are optional (and can be skipped) but we will not be able to deploy without some of the information. If you decide to skip it for now, you can also add them later by going to the Appfile present inside the folder android/fastlane.

Enter the package name of the Android part of your Flutter project.

You can find the package name by going to: FlutterProj –> android –> app –> scr –> main –> AndroidManifest.xml

It is not needed to add the secret JSON file location, as we will be distributing the pre-release version of the app to testers only and the JSON file is not needed by Firebase App Distribution.

This will generate a fastlane folder inside the android directory containing two files:

  1. Appfile (which contains the package name and secret JSON file path)
  2. Fastfile (which contains the commands for building and uploading the app)

Set up fastlane for iOS

We have to follow similar steps also for iOS. Navigate to the iOS directory (FlutterProj/ios/) of your Flutter project, and initialize fastlane by using the command:

After running this command, it will ask for two things:

  1. App Identifier
  2. Apple ID

Both of them are optional (and can be skipped) but we will not be able to deploy without some of the information. If you decide to skip it for now, you can also add them later by going to the Appfile present inside the folder ios/fastlane.

This will generate a fastlane folder inside the ios directory containing two files:

  1. Appfile (which contains the app identifier and apple id)
  2. Fastfile (which contains the commands for building and uploading the app)

Add the Firebase App Distribution plugin

To add the Firebase App Distribution plugin for fastlane, run the following command from the android directory:

fastlane add_plugin firebase_app_distribution

Now, you can use this plugin inside your Fastfile to upload your app to Firebase App Distribution.

Before moving on to customizing the Fastfile, we have to create a Firebase project for using the Firebase App Distribution.

Creating a Firebase project

  1. Go to the Firebase Console.
  2. Click on Add project.
    Firebase console - Add project
  3. Add a name of the project and click on Continue.
    Firebase console - Add project
  4. Go to Settings –> Project settings.
    Firebase Project
  5. Now, enter the Support email and the GCP resource location.
    Firebase Settings

Adding Android project

  1. Scroll down and click on the Android icon to add your Android project.
    Firebase Settings

  2. Enter the Android package name, App nickname and SHA-1, then click on Register app.
    Firebase Android project

    To generate SHA-1, you have to run the following command from the root Flutter app directory:

     bash
     keytool -list -v 
     -alias androiddebugkey -keystore ~/.android/debug.keystore
    

    The password for the Android keystore is empty by default, so just press Enter when it asks for password.

  3. Download the google-services.json file and place it in the desired folder, then click on Next.
    Firebase Android project

  4. Add the Firebase SDK as per the instruction.

  5. Click on Continue to console.
    Firebase Android project

You will find the App ID for the Android app in this page. We will need this App ID in the future for configuring fastlane.

Firebase Settings

Adding iOS project

Similarly, we also have to add the iOS project.

  1. Click on Add app from the same page and select the iOS icon.
    Firebase console
  2. Enter the iOS bundle ID and an App nickname, then click on Register app.
    Firebase iOS project
  3. Download the GoogleService-Info.plist file and place it in the desired folder. Click on Next.
    Firebase iOS project
  4. You can skip Step 3 & 4, because they are already generated while creating the Flutter project.
  5. Click on Continue to console.

Here, you will find the App ID for the iOS project. We will need this App ID in the future for configuring fastlane.

Firebase console

Customizing the Android Fastfile

Navigate to the Fastfile in android directory using your preferred code editor.

You can find it inside the folder: FlutterProj –> android –> fastlane.

Android Fastfile

The Fastfile is written using Ruby language.

Here, you will see that there are three lanes specified:

  1. test
  2. beta
  3. deploy

We will be using our custom lane for building and deploying the Android .apk file of our Flutter project.

So, delete the whole platform block along with all the lanes and add the following:

platform :android do
    desc "<Enter a description>"
    gradle(
        task: 'assemble',
        build_type: 'Release'
    )
    lane :android_beta_app do
        firebase_app_distribution(
            app: "<Enter the App ID from Firebase>",
            testers: "***@gmail.com, ***@gmail.com",
            release_notes: "<Enter the release notes>",
            firebase_cli_path: "/usr/local/bin/firebase",
            apk_path: "../build/app/outputs/apk/release/app-release.apk"
        )
    end
end

Replace the angle brackets with proper information.

Let’s understand what this build and deploy script contains.

First of all, we are defining the platform to be android and then we have three properties:

  1. desc
  2. gradle()
  3. lane
  • desc: General description of the script
  • gradle: This contains the build type of the .apk, here it is set to release build
  • lane: At the beginning we have to define the lane name, here it is android_beta_app and then we have to define the firebase_app_distribution settings
    • firebase_app_distribution: We have defined here five properties:
      • app: Enter the unique App ID generated by Firebase
      • testers: Enter the email of the people to whom you want to send the test version of the app
      • release_notes: Here you can add some notes which will be displayed while the testers download the app on their device
      • firebase_cli_path: Path to the Firebase CLI tool
      • apk_path: Path to the generated .apk file

Customizing the iOS Fastfile

Navigate to the Fastfile in iOS directory using your preferred code editor.

You can find it inside the folder: FlutterProj –> ios –> fastlane.

Delete the whole platform block along with the lanes and add the following:

platform :ios do
  desc "New iOS build for Counter Demo app"
    lane :ios_beta_app do
        build_app(
            scheme: "Runner",
            archive_path: "./build/Runner.xcarchive",
            export_method: "development",
            output_directory: "./build/Runner"
        )
        firebase_app_distribution(
            app: "<Enter the App ID from Firebase>",
            testers: "***@gmail.com, ***@gmail.com",
            release_notes: "Initial test version of the app",
            firebase_cli_path: "/usr/local/bin/firebase",
            ipa_path: "./build/Runner/Runner.ipa"
        )
    end
end

Replace the angle brackets with proper information.

Deploying to Firebase App Distribution

The project is now ready to be deployed to Firebase App Distribution using the fastlane configuration we have defined.

Before running the fastlane script, make sure the Firebase project is properly added by running the following command:

This should generate an output like this:
List of Firebase projects

Deploying Android app

To deploy the Android .apk file to Firebase App Distribution, follow the steps below:

  1. Go to your project from the Firebase console.

  2. Then, from the options on the left of the page, select App Distribution.

  3. Click on Get started.

  4. Now, you can run the script from terminal to publish the app to Firebase App Distribution. Run this command from the android folder:

    bundle exec fastlane <name_of_lane>
    

    Replace the <name_of_lane> with the lane that you want to run. In my script the lane is android_beta_app.

If the lane gets successfully deployed, then you will get a terminal output like this:

If the command stops or generates any error, then run this command from the terminal:

bundle install --path vendor/bundle

Now, restart the terminal any try to deploy it again using the command specified in Step 4.

Deploying iOS app

To deploy the iOS .ipa file to the Firebase App Distribution, run the following script from the ios folder of the Flutter project:

bundle exec fastlane <name_of_lane>

Replace the <name_of_lane> with the lane that you want to run. In my script the lane is ios_beta_app.

If the lane gets successfully deployed, then you will get a terminal output like this:

If you get any code-signing error like this,

open the ios folder of the Flutter project using Xcode and complete the code-signing process.

Conclusion

You can now go to the App Distribution option of the project from Firebase console to find the deployed version of the app.

Firebase console

Here, you can also track how many of the users have accepted the invitation or downloaded the app.

Fastlane with Firebase App Distribution makes a great combination for building, testing & distributing Flutter apps without any hassle.

The official documentation for using fastlane as a continuous delivery platform for Flutter apps is available here.

You can also integrate fastlane with Codemagic CI/CD, check out this article for more information.


Souvik Biswas is a passionate Mobile App Developer (Android and Flutter). He has worked on a number of mobile apps throughout his journey. Loves open source contribution on GitHub. He is currently pursuing a B.Tech degree in Computer Science and Engineering from Indian Institute of Information Technology Kalyani. He also writes Flutter articles on Medium – Flutter Community.

More articles by Souvik:



Source link

ShareTweetSend
Previous Post

NCIC urges Kenyans to maintain peace after presidential results declaration » Capital News

Next Post

the Holy City – europeantimes.news

Related News

Unlocking Potential: Exploring the FDE Model in Enterprise AI Solutions
Mobile

Unlocking Potential: Exploring the FDE Model in Enterprise AI Solutions

November 14, 2026
Unlocking the Scoop: Upcoming Sale Dates, Price Highlights, and Previous Bargains
Mobile

Unlocking the Scoop: Upcoming Sale Dates, Price Highlights, and Previous Bargains

November 14, 2026
Unlocking Website Security: The Marketbyte Edge in Open Source Solutions
Mobile

Unlocking Website Security: The Marketbyte Edge in Open Source Solutions

November 13, 2026
Uncovering the Best Solutions for Your Mobile Risk Concerns
Mobile

Uncovering the Best Solutions for Your Mobile Risk Concerns

November 12, 2026
Next Post
the Holy City – europeantimes.news

the Holy City – europeantimes.news

Discussion about this post

Subscribe To Our Newsletters

    Customer Support


    1251 Wilcrest Drive
    Houston, Texas
    77042 USA
    Call-832.795.1420
    e-mail – news@theinsightpost.com

    Subscribe To Our Newsletters

      Categories

      • Africa
      • Africa-East
      • African Sports
      • American Sports
      • Arts
      • Asia
      • Australia
      • Business
      • Business Asia
      • Business- Africa
      • Canada
      • Defense
      • Education
      • Egypt
      • Energy
      • Entertainment
      • Europe
      • European Soccer
      • Finance
      • Germany
      • Ghana
      • Health
      • Insight
      • International
      • Investing
      • Japan
      • Latest Headlines
      • Life & Living
      • Markets
      • Mobile
      • Movies
      • New Zealand
      • Nigeria
      • Politics
      • Scholarships
      • Science
      • South Africa
      • South America
      • Sports
      • Tech
      • Travel
      • Travel-Africa
      • UK
      • USA
      • Weather
      • World
      No Result
      View All Result

      Recent News

      Gators Shock Wildcats 21-14 in Thrilling Upset Amid Rollercoaster Season

      Gators Shock Wildcats 21-14 in Thrilling Upset Amid Rollercoaster Season

      November 15, 2026
      Government Announces Historic  Billion Investment in Energy Infrastructure Development

      Government Announces Historic $2 Billion Investment in Energy Infrastructure Development

      November 15, 2026
      Notre Dame Postgame Insights: Dive into Superchats with Westwood One Sports

      Notre Dame Postgame Insights: Dive into Superchats with Westwood One Sports

      November 15, 2026
      Transform Your Laptop Setup with These 5 Affordable Accessories

      Transform Your Laptop Setup with These 5 Affordable Accessories

      November 15, 2026
      • Home
      • Advertise With Us
      • About Us
      • Corporate
      • Consumer Rewards
      • Forum
      • Privacy Policy
      • Social Trends

      Theinsightpost ©2026 | All Rights Reserved. Theinsightpost is an Elnegy LLC company, registered in Texas, USA

      Welcome Back!

      Login to your account below

      Forgotten Password?

      Retrieve your password

      Please enter your username or email address to reset your password.

      Log In

      Add New Playlist

      We are using cookies to give you the best experience on our website.

      You can find out more about which cookies we are using or switch them off in .

      No Result
      View All Result
      • Home
      • Insight
      • Blog
      • Business
      • Entertainment
      • Health
      • Politics
      • Shop
        • Gift Shop
        • Value Shop
        • Store
        • Bargain Shop
        • Discount
      • Sports
      • Tech
      • Travel
      • USA
      • Video
      • World
        • Asia
        • Africa
        • South America
        • North America
        • Europe
        • Oceania

      Theinsightpost ©2026 | All Rights Reserved. Theinsightpost is an Elnegy LLC company, registered in Texas, USA

      The Insight Post
      Powered by  GDPR Cookie Compliance
      Privacy Overview

      This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

      Strictly Necessary Cookies

      Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.

      Cookie Policy

      More information about our Cookie Policy