A collage representing app development stages with Android Studio and Xcode for the TWIL series on build variants and Firebase integration.

Welcome to this week's TWIL—your go-to series for micro learning about complex topics through the insights of our team. Join Marisa as she explores the world of app development with Build Variants with Firebase Integration, delving into Android's versatile build gradle system, and iOS's scheme-target dichotomy in Xcode for managing development, staging, and release configurations. Discover the nuances of configuring multiple visions of your app with practical code snippets demonstrating how to tailor your project's identity for diverse environments.

Build Variants with Firebase Integration

Build Configurations

Each build configuration represents a different version of your app that you can build. You may want to utilize build variants for denoting between development, staging and release versions. Typically we would do this by adding a suffix to the bundle id:

com.cuttlesoft

com.cuttlesoft.dev

com.cuttlesoft.staging

Android

For Android, these are called Build Variants and they are defined within the app's build.gradle file:

signingConfigs {
        debug {
            storeFile file('debug.keystore')
            storePassword 'debug'
            keyAlias 'androiddebugkey'
            keyPassword 'android'
        }
        staging {
            storeFile file('staging.keystore')
            storePassword 'staging'
            keyAlias 'androidstagingkey'
            keyPassword 'android'
        }
        release {
            storeFile file('release.keystore')
            storePassword 'release'
            keyAlias 'androidreleasekey'
            keyPassword 'android'
        }
    }
    buildTypes {
        debug {
            applicationIdSuffix ".dev"
            signingConfig signingConfigs.debug
        }
        staging {
            applicationIdSuffix ".staging"
            signingConfig signingConfigs.staging
        }
        release {
            signingConfig signingConfigs.release
        }
    }

iOS

For iOS, these are called build configurations. We use a combination of build schemes and build targets. Creating a new target will create a new scheme as well. To use different schemes we must define the different targets in the podfile:

def sharedPods
  # Pods for myApp
  
	...

  use_native_modules!
end

target 'myApp' do
  sharedPods
end

target 'myApp Dev' do
  sharedPods
end

target 'myApp Staging' do
  sharedPods
end

Firebase

We should create different Apps for each build configuration. We store the specific services files in nested directories within each project (create a directory for each build configuration):

Android

We store the generated google-services.json files in their respective build directories:

iOS

We store the generated GoogleService-info.plist files in their respective build directories nested under the project directory:

Resources:

  • Android
  • Java
  • Android Studio
  • iOS
  • Objective-C
  • Swift
  • Xcode
  • Firebase

Marisa Gomez's profile picture
Marisa Gomez

Senior Software Engineer

Related Posts

Directional signpost with signs pointing to global destinations, representing the many app distribution channels available in 2026.
March 4, 2026 • Frank Valcarcel

How to Choose the Right App Distribution Channel in 2026

The distribution decision is no longer just ‘put it on the App Store.’ This guide compares nine channels across iOS, Android, and the web, from public stores and unlisted apps to PWAs and MDM deployment, with a decision matrix for choosing the right one for your use case.

Spam reputation gauge with the needle in the red zone. Envelope icons cluster on the healthy green side of the meter while bot icons crowd the orange and red warning area.
February 27, 2026 • Frank Valcarcel

Bots Are Quietly Destroying Your Email Deliverability

Every verification email your system sends to an address that did not ask for it is a small bet against your sender reputation. At the scale bots operate today, with automated traffic now exceeding 51% of all web activity, those bets add up fast. Bot deterrence is not optional.

Let's work together

Tell us about your project and how Cuttlesoft can help. Schedule a consultation with one of our experts today.

Contact Us