Configuring Flavors/Schemes for Mobile App Versions

Configuring Flavor/Scheme for Mobile App Versions Picture this: your fintech startup releases a white-label app for three banks. Each has its own design, API endpoint, and bundle. QA needs to test staging without risking production data. Without proper Flavor/Scheme setup, you'll get package name

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 1All 1734 services
Configuring Flavors/Schemes for Mobile App Versions
Medium
~2-3 days

Our competencies:

Frequently Asked Questions

Latest works

  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    894
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    782
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1216
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    1079
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    1002
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    597

Configuring Flavor/Scheme for Mobile App Versions

Picture this: your fintech startup releases a white-label app for three banks. Each has its own design, API endpoint, and bundle. QA needs to test staging without risking production data. Without proper Flavor/Scheme setup, you'll get package name confusion and be unable to install two versions side by side. We solve this in 2–5 days using Product Flavors (Android), Schemes/Targets (iOS), and Flutter configurations. In 5 years we've completed over 30 projects—from fintech to B2B white-label. We guarantee that after setup, you can install all versions on one device simultaneously without conflicts.

How to Set Up Flavors on Different Platforms?

Android: Product Flavors

Product Flavors in Android create separate app variants with different applicationIds, 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" } } } 

This creates a matrix: devFreeDebug, devPaidRelease, productionFreeRelease, etc. Usually we use only the needed combinations and explicitly filter the rest via variantFilter. Flavor-specific resources go into src/dev/res/, src/staging/res/, src/production/res/. Kotlin code goes into src/dev/kotlin/ etc.

iOS: Targets and Schemes

On iOS, the role of Flavors is played by the combination of Targets + Schemes + xcconfig. Apple Developer Documentation recommends this approach for separating configurations.

One Target, Multiple Schemes + Build Configurations — for staging/production:

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

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

  • Each Target has its own PRODUCT_BUNDLE_IDENTIFIER, icon, Info.plist
  • Common code → Shared framework or shared files added to both Targets
  • Heavier to maintain but gives 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 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 config, main_production.dart with production config. The config is passed via --dart-define or via a separate app_config.dart per flavor. In pubspec.yaml, you can use flutter_flavorizr to generate boilerplate—creating required Targets/Schemes on iOS and Product Flavors on Android from one config file.

What to Choose: One Target or Multiple?

The answer depends on the volume of differences. If it's only bundle ID, API endpoint, and icon—one Target with multiple Schemes is enough. If different code, push capabilities (APNs/FCM), or third-party SDKs are needed—go with multiple Targets (iOS) / flavorDimensions (Android). On Android, flavorDimensions easily combine free vs paid and staging vs production simultaneously. According to our measurements, one Target with multiple Schemes is 3 times faster to configure than multiple Targets.

Why Separating Configurations Saves Time and Headaches?

Imagine QA testing a staging build accidentally deletes the production database? With different bundle IDs this is impossible—the system treats them as separate apps. Dev sits next to production, and you can instantly compare behavior. Also, the App Store Review Guidelines (Section 4.2) require that test versions not be mixed with production ones—we take this into account.

Example from practice: white-label for a coffee chain We configured 4 brands with different icons, colors, and Geopush API key. Used 2 flavorDimensions (brand, environment) on Android and 4 Targets on iOS. The CI built the release in 3 days. Time savings on each update: 40%.

Typical Mistakes When Configuring Flavors

Mistake Consequence Solution
New flavor without updating CI Build won't appear in pipeline Add lane in Fastlane
Duplicating code Reduced maintainability Use src// overlay
Different versionCode across same flavors Version confusion Centralize version management

Work Process

  1. Requirements audit (how many variants, what differences, who will build)
  2. Choose approach: Flavors vs Targets vs combined
  3. Create resource and code structure (resource overlays, config files)
  4. Set up CI (Fastlane + GitHub Actions / GitLab CI) for building all variants
  5. Test side-by-side installation (verify no package name overlap)
  6. Document the process for adding a new version

Platform Comparison

Criteria Android (Product Flavors) iOS (Targets + Schemes)
Setup complexity Low (via Gradle) Medium (via Xcode Project)
Multiple version support Excellent (flavorDimensions) Good (Targets require synchronization)
White-label (different brands) Easy (different resources in folders) Heavier (needs Shared framework)
CI/CD integration Simple (Gradle task) Medium (Fastlane + xcodebuild)
App Store review Not needed Separate attention for each Target

Timeline and Cost

Timeline: 2–3 days for a standard scheme (staging/production), up to 5 days for white-label with multiple brands. Cost is calculated individually after an audit. Get a consultation—contact us, we'll evaluate your project and propose the optimal solution.

Order turnkey flavor setup—your project will be ready for scaling without architectural conflicts.