Setting up Flavors/Schemes for different mobile application versions

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Setting up Flavors/Schemes for different mobile application versions
Medium
~2-3 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1052
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Setting up Flavors/Schemes for Different Mobile App Versions

One repository, multiple applications. A white-label product for three clients. Free and paid versions with different packages and icons. A staging build for QA with a different bundle ID that can be installed alongside the production version. These are all tasks for Product Flavors (Android) and Schemes/Targets (iOS).

Android: Product Flavors

Product Flavors in Android create separate app variants with different applicationId, resources, code, and dependencies.

android {
    flavorDimensions += listOf("environment", "tier")

    productFlavors {
        create("dev") {
            dimension = "environment"
            applicationIdSuffix = ".dev"
            versionNameSuffix = "-dev"
            resValue("string", "app_name", "MyApp Dev")
        }
        create("staging") {
            dimension = "environment"
            applicationIdSuffix = ".staging"
            versionNameSuffix = "-staging"
            resValue("string", "app_name", "MyApp Staging")
        }
        create("production") {
            dimension = "environment"
        }
        create("free") {
            dimension = "tier"
            applicationIdSuffix = ".free"
        }
        create("paid") {
            dimension = "tier"
        }
    }
}

The flavor matrix creates combinations like devFreeDebug, devPaidRelease, productionFreeRelease, etc. Typically only the necessary combinations are used, with others filtered via variantFilter.

Flavor-specific resources are stored in src/dev/res/, src/staging/res/, src/production/res/. Kotlin code specific to a flavor goes in src/dev/kotlin/, etc.

iOS: Targets and Schemes

In iOS, Flavors are achieved through a combination of Targets + Schemes + xcconfig.

One target, multiple Schemes + Build Configurations — for staging/production scenarios:

  • Create configurations: Debug, Staging, Release
  • Create Schemes: MyApp, MyApp-Staging
  • Each Scheme runs the appropriate Configuration

Multiple Targets — for white-label or significantly different versions (different code, different capabilities):

  • Each Target has its own PRODUCT_BUNDLE_IDENTIFIER, icon, Info.plist
  • Shared code → shared framework or common files added to both Targets
  • More complex to maintain, but provides maximum control
Targets:
  MyApp          → com.myapp.ios         → AppIcon        → Release.xcconfig
  MyApp-ClientB  → com.clientb.myapp     → AppIconClientB → ClientB.xcconfig
  MyApp-Staging  → com.myapp.ios.staging → AppIconStaging → Staging.xcconfig

Flutter: Flavors

Flutter supports flavors natively, mapping them to Android Product Flavors and iOS Schemes under the hood:

flutter run --flavor staging -t lib/main_staging.dart
flutter build apk --flavor production -t lib/main_production.dart

main_staging.dart initializes the app with staging configuration, main_production.dart with production. Configuration is passed via --dart-define or through a separate app_config.dart for each flavor.

With flutter_flavorizr in pubspec.yaml, you can generate boilerplate — it creates the necessary Targets/Schemes on iOS and Product Flavors on Android from a single config file.

Common Mistakes

  • Adding a new flavor without updating CI — the pipeline only builds old variants
  • Duplicating code instead of using src/<flavor>/ overlay — maintainability suffers
  • Using different versionCode/CFBundleVersion for different flavors of the same release — causes testing confusion

Process

Audit flavor requirements → choose approach (Flavors vs Targets) → create resource structure → configure CI to build needed variants → test side-by-side installation → document.

Timeline: 2–3 days for a standard setup, up to 5 days for white-label with multiple brands. Cost is calculated individually.