Git Product home page Git Product logo

angeloavv / flutter_flavorizr Goto Github PK

View Code? Open in Web Editor NEW
422.0 6.0 75.0 948 KB

A flutter utility to easily create flavors in your flutter application

Home Page: https://pub.dev/packages/flutter_flavorizr

License: MIT License

Dart 98.04% Ruby 1.08% Kotlin 0.04% Swift 0.60% Objective-C 0.01% Shell 0.23%
flutter-utility flutter android ios flavors dartlang dart flutter-plugin cross-platform flutter-plugins

flutter_flavorizr's Introduction

Flutter Flavorizr

A flutter utility to easily create flavors in your flutter application

Pub Dart CI Star on GitHub License: MIT

If you want to support this project, please leave a star, share this project, or consider donating through Github Sponsor.

Getting Started

Let's start by setting up our environment in order to run Flutter Flavorizr

Prerequisites

Side note: this tool works better on a new and clean Flutter project. Since some processors reference some existing files and a specific base structure, it could be possible that running Flutter Flavorizr over an existing project could throw errors.

Before running Flutter Flavorizr, you must install the following software:

These prerequisites are needed to manipulate the iOS and macOS projects and schemes. If you are interested in flavorizing Android only, you can skip this step.

If your app uses a Flutter plugin and you plan to create flavors for iOS and macOS, you need to make sure there's an existing Podfile file under the ios/macos folder. This might lead to problems like "Unable to load contents of file list".

Installation

This package is intended to support development of Flutter projects. In general, put it under dev_dependencies, in your pubspec.yaml:

dev_dependencies:
  flutter_flavorizr: ^2.2.3

You can install packages from the command line:

pub get

Create your flavors

Once all of the prerequisites have been installed and you have added flutter_flavorizr as a dev dependency, you have to edit your pubspec.yaml and define the flavors.

Example

Create a new file named flavorizr.yaml and define the name of the flavors, in our example apple and banana. For each flavor you have to specify the app name, the applicationId and the bundleId.

flavors:
  apple:
    app:
      name: "Apple App"

    android:
      applicationId: "com.example.apple"  
    ios:
      bundleId: "com.example.apple"
    macos:
      bundleId: "com.example.apple"  
  banana:
    app:
      name: "Banana App"
  
    android:
      applicationId: "com.example.banana"
    ios:
      bundleId: "com.example.banana"
    macos:
      bundleId: "com.example.banana"

Alternatively, add a new key named flavorizr and define a sub item named flavors. Under the flavors array you can define the name of the flavors, in our example apple and banana. For each flavor you have to specify the app name, the applicationId and the bundleId. This way of defining flavors will be deprecated in versions 3.x

flavorizr:
  flavors:
    apple:
      app:
        name: "Apple App"

      android:
        applicationId: "com.example.apple"
      ios:
        bundleId: "com.example.apple"
      macos:
        bundleId: "com.example.apple"        
    banana:
      app:
        name: "Banana App"

      android:
        applicationId: "com.example.banana"
      ios:
        bundleId: "com.example.banana"
      macos:
        bundleId: "com.example.banana"

Available fields

flavorizr

key type default required description
app Object false An object describing the general capabilities of an app
flavors Array true An array of items. Each of them describes a flavor configuration
instructions Array false An array of instructions to customize the flavorizr process
assetsUrl String link false A string containing the URL of the zip assets file. The default points to the current release
ide String false The IDE in which the app is being developed. Currently only vscode or idea
value category description
assets:download Miscellaneous Downloads the assets zip from the network
assets:extract Miscellaneous Extracts the downloaded zip in the project .tmp directory
assets:clean Miscellaneous Removes the assets from the project directory
android:buildGradle Android Adds the flavors to the Android build.gradle file
android:androidManifest Android Changes the reference of the app name in the AndroidManifest.xml
android:dummyAssets Android Generates some default icons for your custom flavors
android:icons Android Creates a set of icons for each flavor according to the icon directive
flutter:flavors Flutter Creates the flutter flavor configuration file
flutter:app Flutter Creates the app.dart entry
flutter:pages Flutter Creates a set of default pages for the app
flutter:main Flutter Creates the main target to run the app
flutter:targets Flutter Creates a set of targets for each flavor instance
google:firebase Google Adds Google Firebase configurations for Android and iOS for each flavor
huawei:agconnect Huawei Adds Huawei AGConnect configurations for Android for each flavor
ide:config IDE Generates debugging configurations for each flavor of your IDE
ios:podfile iOS Updates the Pods-Runner path for each flavor
ios:xcconfig iOS Creates a set of xcconfig files for each flavor and build configuration
ios:buildTargets iOS Creates a set of build targets for each flavor and build configuration
ios:schema iOS Creates a set of schemas for each flavor
ios:dummyAssets iOS Generates some default icons for your custom flavors
ios:icons iOS Creates a set of icons for each flavor according to the icon directive
ios:plist iOS Updates the info.plist file
ios:launchScreen iOS Creates a set of launchscreens for each flavor
macos:podfile macOS Updates the Pods-Runner path for each flavor
macos:xcconfig macOS Creates a set of xcconfig files for each flavor and build configuration
macos:configs macOS Creates a set of xcconfig files for each flavor and build configuration
macos:buildTargets macOS Creates a set of build targets for each flavor and build configuration
macos:schema macOS Creates a set of schemas for each flavor
macos:dummyAssets macOS Generates some default icons for your custom flavors
macos:icons macOS Creates a set of icons for each flavor according to the icon directive
macos:plist macOS Updates the info.plist file

android (under app)

key type default required description
flavorDimensions String "flavor-type" false The value of the flavorDimensions in the android build.gradle file
resValues Array {} false An array which contains a set of resValues configurations
buildConfigFields Array {} false An array which contains a set of buildConfigFields configurations

ios (under app)

key type default required description
buildSettings Dictionary {} false An XCode build configuration dictionary XCode Build Settings

macos (under app)

key type default required description
buildSettings Dictionary {} false An XCode build configuration dictionary XCode Build Settings

app (under flavorname)

key type default required description
name String true The name of the App
icon String false The icon path for this flavor

android (under flavorname)

key type default required description
applicationId String true The applicationId of the Android App
firebase Object false An object which contains a Firebase configuration
resValues Array false An array which contains a set of resValues configurations
buildConfigFields Array false An array which contains a set of buildConfigFields configurations
customConfig Array false An array which contains a set of custom configs, overrides defaultConfig
generateDummyAssets bool true false True if you want to generate dummy assets (icon set, strings, etc)
icon String false The icon path for this android flavor
adaptiveIcon Array false An array which contains foreground and background of adaptive icon

ios (under flavorname)

key type default required description
bundleId String true The bundleId of the iOS App
buildSettings Dictionary {} false A flavor-specific XCode build configuration dictionary XCode Build Settings
firebase Object false An object which contains a Firebase configuration
variables Array false An array which contains a set of variables configurations
generateDummyAssets bool true false True if you want to generate dummy assets (xcassets, etc)
icon String false The icon path for this iOS flavor

macos (under flavorname)

key type default required description
bundleId String true The bundleId of the macOS App
buildSettings Dictionary {} false A flavor-specific XCode build configuration dictionary XCode Build Settings
firebase Object false An object which contains a Firebase configuration
variables Array false An array which contains a set of variables configurations
generateDummyAssets bool true false True if you want to generate dummy assets (xcassets, etc)
icon String false The icon path for this macOS flavor

firebase

key type default required description
config String false The path to the Firebase configuration file (google-services.json for Android and GoogleService-Info.plist for iOS and macOS)

agconnect (for Android)

key type default required description
config String false The path to the AGConnect configuration file (agconnect-services.json)

resValue (for Android)

key type default required description
type String true The type of the resValue variable
value String true The value of the resValue variable
flavors:
  apple:
    app:
      name: "Apple App"
  
    android:
      applicationId: "com.example.apple"
      resValues:
        variable_one:
          type: "string"
          value: "example variable one"
        variable_two:
          type: "string"
          value: "example variable two"
  
    ios:
      bundleId: "com.example.apple"

buildConfigField (for Android)

key type default required description
type String true The type of the buildConfigField variable
value String true The value of the buildConfigField variable
flavors:
  apple:
    app:
      name: "Apple App"
  
    android:
      applicationId: "com.example.apple"
      buildConfigFields:
        field_one:
          type: "String"
          value: "example field one"
        field_two:
          type: "char"
          value: "y"
        field_three:
          type: "double"
          value: "20.0"
  
    ios:
      bundleId: "com.example.apple"

variable (for iOS and macOS)

key type default required description
target String false The type of the target (debug, release, profile). Do not specify a target if you want to apply it to all of them.
value String true The value of the variable
flavors:
  apple:
    app:
      name: "Apple App"
  
    android:
      applicationId: "com.example.apple"
  
    ios:
      bundleId: "com.example.apple"
      variables:
        VARIABLE_ONE:
          value: "variable1"
        VARIABLE_TWO:
          target: "Debug"
          value: "variable2"        

customConfig (for Android only)

You can define any custom property for android

flavors:
  apple:
    app:
      name: "Apple App"
  
    android:
      applicationId: "com.example.apple"
      customConfig:
          versionNameSuffix: "\"-green-prod\"" # Don't forget to escape strings with \"
          signingConfig: flavorSigning.green
          versionCode: 1000
          minSdkVersion: 23
          # ..... and any custom property you want to add

This .yml part, generate this custom android flavor:

apple {
  dimension "flavor-type"
  applicationId "com.example.apple"
  versionNameSuffix "-green-prod"
  signingConfig flavorSigning.green
  versionCode 1000
  minSdkVersion 23
}

adaptiveIcon (for Android only)

You can define adaptiveIcon for android:

flavors:
  apple:
    app:
      name: "Apple App"
  
    android:
      applicationId: "com.example.apple"
      icon: "assets/icon/appleApp/ic_launcher.png"
      adaptiveIcon:
        foreground: "assets/adaptive_icon/appleApp/ic_launcher_foreground.png"
        background: "assets/adaptive_icon/appleApp/ic_launcher_background.png"

After removing adaptiveIcon key, the adaptive icons generated before will still exist. Please delete adaptiveIcon manually.

Usage

When you finished defining the flavorizr configuration, you can proceed by running the script with:

flutter pub run flutter_flavorizr

You can also run flutter_flavorizr with a custom set of processors by appending the -p (or --processors) param followed by the processor names separated by comma:

flutter pub run flutter_flavorizr -p <processor_1>,<processor_2>

Example

flutter pub run flutter_flavorizr -p assets:download
flutter pub run flutter_flavorizr -p assets:download,assets:extract

Run your flavors

Once the process has generated the flavors, you can run them by typing

flutter run --flavor <flavorName> -t lib/main_<flavorName>.dart

Example

flutter run --flavor apple -t lib/main_apple.dart
flutter run --flavor banana -t lib/main_banana.dart

Currently, due to a bug in the Flutter SDK, it's not possible to run the macOS flavors from the terminal. You can run them from XCode by selecting the proper schema and by pressing play.

Default processors set

By default, when you do not specify a custom set of processors by appending the -p (or --processors) param, a default processors set will be used:

  • assets:download
  • assets:extract
  • android:androidManifest
  • android:buildGradle
  • android:dummyAssets
  • android:icons
  • flutter:flavors
  • flutter:app
  • flutter:pages
  • flutter:main
  • flutter:targets
  • ios:podfile
  • ios:xcconfig
  • ios:buildTargets
  • ios:schema
  • ios:dummyAssets
  • ios:icons
  • ios:plist
  • ios:launchScreen
  • macos:podfile
  • macos:xcconfig
  • macos:configs
  • macos:buildTargets
  • macos:schema
  • macos:dummyAssets
  • macos:icons
  • macos:plist
  • google:firebase
  • huawei:agconnect
  • assets:clean
  • ide:config

Customize your app

Flutter_flavorizr creates different dart files in the lib folder. In the flavors.dart file we have the F class which contains all of our customizations.

class F {
  static Flavor? appFlavor;

  static String get title {
    switch (appFlavor) {
      case Flavor.apple:
        return 'Apple App';
      case Flavor.banana:
        return 'Banana App';
      default:
        return 'title';
    }
  }

}

The process creates a simple title customization: a switch which checks the current appFlavor (defined in our app starting point) and returns the correct value. Here you can write whatever you want, you can create your custom app color palette, differentiate the URL action of a button, and so on.

If you are wondering how to use these getters, you can find an example under the pages folder: in the my_home_page.dart file, the page shown after the launch of the app, we can see a clear reference on the title getter defined in the F class.

Side notes

I haven't found yet a good groovy parser to guarantee the idempotency of the AndroidBuildGradleProcessor.
The only way to keep track of the autogenerated flavorDimensions is to mark up the beginning and the end of the section with magic comments.
Please do not erase these comments otherwise you will break down the AndroidBuildGradleProcessor.

Third party services

Google Firebase

In order to flavorize your project and enable Firebase in your flavor you have to define a firebase object below each OS flavor. Under the firebase object you must define the config path of the google-services.json (if you are under Android configuration) or GoogleService-Info.plist (if you are under iOS or macOS configuration).

As you can see in the example below, we added the path accordingly

flavors:
  apple:
    app:
      name: "Apple App"
  
    android:
      applicationId: "com.example.apple"
      firebase:
        config: ".firebase/apple/google-services.json"
  
    ios:
      bundleId: "com.example.apple"
      firebase:
        config: ".firebase/apple/GoogleService-Info.plist"
  
  banana:
    app:
      name: "Banana App"
      
    android:
      applicationId: "com.example.banana"
      firebase:
        config: ".firebase/banana/google-services.json"
    ios:
      bundleId: "com.example.banana"
      firebase:
        config: ".firebase/banana/GoogleService-Info.plist"

Huawei AppGallery Connect

In order to flavorize your project and enable AppGallery Connect in your flavor
you have to define an agconnect object below each Android flavor. Under the agconnect object you must define the config path of the agconnect-services.json.

As you can see in the example below, we added the path accordingly

flavors:
  apple:
    app:
      name: "Apple App"
  
    android:
      applicationId: "com.example.apple"
      agconnect:
        config: ".agconnect/apple/agconnect-services.json"
  
    ios:
      bundleId: "com.example.apple"
  
  banana:
    app:
      name: "Banana App"
      
    android:
      applicationId: "com.example.banana"
      agconnect:
        config: ".agconnect/banana/agconnect-services.json"
    ios:
      bundleId: "com.example.banana"

Troubleshooting

How to fix the error "Unable to load contents of file list"

Docs & Tutorials (from the community)

Easily build flavors in Flutter (Android and iOS) with flutter_flavorizr - Angelo Cassano

Get the best out of Flutter flavors with flutter_flavorizr - Pierre Monier

Further developments

  • Let the user define its custom set of available instructions.

Questions and bugs

Please feel free to submit new issues if you encounter problems while using this library.

If you need help with the use of the library or you just want to request new features, please use the Discussions section of the repository. Issues opened as questions will be automatically closed.

License

Flutter Flavorizr is available under the MIT license. See the LICENSE file for more info.

flutter_flavorizr's People

Contributors

angeloavv avatar bearlysophisticated avatar burhankhanzada avatar cedvdb avatar danijel-tolj avatar ericide avatar jonathanaj avatar jrc2139 avatar marinagosson avatar mduruisseau avatar mirland avatar mrtarantula avatar radugrama avatar renovate[bot] avatar sanjeevkpandit avatar vigorox avatar vinifig avatar vixez avatar ywake avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

flutter_flavorizr's Issues

Different icons and Launch Images assets for each flavor

Hello,

First, thank you for this package which is extremely helpful to gain time when using flavors !

One issue I have and I don't seem to find an answer is :

Is there a possibility to define a folder to take the different icons for the different flavors ? What I mean is, with the current version, it seems that all the flavors use the same launch icons and launch screens.
Do I have to disable the "generateDummyAssets" for android and iOS and manually add the assets in the android folder and Xcode project for each flavor ?

I hope you understand my question, if not just tell me and I can clarify !

Thank you for your time !

"prod" flavor not working on iOS

Hi,

First of all, thank you a lot for this package that is amazing in flavor handling.

I have tried this configuration :

flavorizr:
  app:
    android:
      flavorDimensions: "flavor-type"
    ios:
  flavors:
    dev:
      app:
        name: "App-dev"
      android:
        applicationId: "com.example.dev"
      ios:
        bundleId: "com.example.dev"

    preprod:
      app:
        name: "App-preprod"
      android:
        applicationId: "com.example.preprod"
      ios:
        bundleId: "com.example.preprod"

    prod:
      app:
        name: "App-prod"
      android:
        applicationId: "com.example.prod"
      ios:
        bundleId: "com.example.prod"

Everything works on both Android & iOS except prod flavor on iOS.

Building prod flavor on iOS throw this error :

The Xcode project defines build configurations: Debug, Release, Profile, Debug dev, Profile dev, Release dev, Debug preprod, Profile preprod, Release preprod, Debug prod, Profile prod, Release prod
Flutter expects a build configuration named Debug-prod or similar.
Open Xcode to fix the problem:
  open ios/Runner.xcworkspace
1. Click on "Runner" in the project navigator.
2. Ensure the Runner PROJECT is selected, not the Runner TARGET.
3. Click the Editor->Add Configuration->Duplicate "Debug" Configuration.

   If this option is disabled, it is likely you have the target selected instead
   of the project; see:
   https://stackoverflow.com/questions/19842746/adding-a-build-configuration-in-xcode

   If you have created a completely custom set of build configurations,
   you can set the FLUTTER_BUILD_MODE=debug
   in the .xcconfig file for that configuration and run from Xcode.

4. If you are not using completely custom build configurations, name the newly created configuration debug.
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.

"dev" and "preprod" flavors are working well but not "prod".

Does someone have an idea of the issue ?

Thank you in advance !

flutter_flavorizr cannot create separate app with different app_id/bundle_id for creating variant in flutter

posted here as well: https://stackoverflow.com/questions/62466186/flutter-flavorizr-cannot-create-separate-app-with-different-app-id-bundle-id-for

  • Runner.xcworkspace - there is only one (shouldnt it be different mandarin/arabic)
  • I'ved pubspec.yaml according to flutter_flavorizr specifying the different flavors appid/bundleid
  • in the screenshot, you could see an empty bundle id in xcode

flutter_flavorizr cannot create different apps with different app_id / bundle_id ?

Another beginner question

Thanks for moving forward a very needed tool and for sharing resources.
This is less an issue than a recap to make sure it is worth implementing flavors.

I understand that we can have dev and prod flavors and each can use a separate android manifest file.
For example dev uses sms features, that cannot be in prod due to google play restrictions.
Is this manifest split enough to submit prod ? I am afraid that the reference to sms / telephony services might still trigger big googler's refusal..

Last silly question, apart from splitting assets #2 , would there be any benefits in splitting the .yaml file into a dev.yaml and a prod.yaml ?

a simple noob question about flutter assets seperation

Hello there
thanks for this excellent package it's exactly what i was looking for

i have a small question
what is the best practice for seperating flutter assets like audio,images,etc.. for each flavor ?

or flutter is smart enough to reconize which assets to bundle when building the app ?

thank you for your time

macOS desktop support

Hi, first, great package! Very useful!

So I am experimenting with desktop support for flutter, and checked that it seems that macOS support is missing.
As, I think, this is actually almost the same as for iOS, maybe it would be a great idea to add it?

Thx.

Custom variables for each flavor

Is it possible to create custom variables, similar to 'bundleId' so I can use it inside info.plist file?
The main purpose is to use it for the dynamic links config, but Im pretty sure everyone can have different use case.

	<key>FirebaseDynamicLinksCustomDomains</key>
	<array>
		<string>https://custom.link.flavor</string>
	</array>

Build configuration on iOS uses space instead of -

The build script adds a space to the build configuration name, instead of a -

Flutter expects a build configuration named Debug-#SCHEME_NAME

Manually changing the name in Xcode fixes this.
I have opened a PR to fix this.

#21

[iOS] unable to load contents of xcfilelist

Hello !

I tried to flavorize a small flutter project with two flavors, everything seems to work for Android, but I am unable to launch the app in the iOS Emulator.

I am getting these errors :
error: Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-frameworks-Debug *TARGET*-input-files.xcfilelist' (in target 'Runner' from project 'Runner')

error: Unable to load contents of file list: '/Target Support Files/Pods-Runner/Pods-Runner-frameworks-Debug *TARGET*-output-files.xcfilelist' (in target 'Runner' from project 'Runner')

I tried to clean the project, the pods and to rebuild everything without success.
The file /ios/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks-Debug *TARGET*-input-files.xcfilelist seems to exists as I can see its content.

I didn't find any issue related to this kind of problem, could you help me understand what is going on ?

I am using Flutter 1.20.1, on macOS. Ruby, Gem and Xcodeproj are all up to date.

vscode integration issue

After I run vscode preprocessor I'm not able to run e.g 'prod Debug'

Set the 'program' value in your launch config (eg 'lib/main.dart') then launch again

I have to add manually "program": "lib/main-prod.dart" into launch.json

AndroidBuildGradleProcessor not idempotent

After running several times I noticed that android/app/build.gradle contains several flavorDimensions and productFlavors sections. It appears that AndroidBuildGradleProcessor does not check if those sections exist before appending.

Just something to keep in mind when you work on gradle file parsing.

Remove Flavour

Is there any way or options to delete the existion flavours created?

Tests fail on Windows

Tests fail on Windows due to newline differences. I imagine XCode definitely wants \n so I don't know how to best proceed.

00:03 +5 -5: C:\Users\me\flutter_flavorizr\test\processors\ios\xcconfig_processor_test.dart: Test I
  Expected: '#include "Generated.xcconfig"\r\n'
              '\r\n'
              'FLUTTER_TARGET=lib/main-example.dart\r\n'
              '\r\n'
              'ASSET_PREFIX=example\r\n'
              'BUNDLE_NAME=Example App\r\n'
              ''
    Actual: '#include "Generated.xcconfig"\n'
              '\n'
              'FLUTTER_TARGET=lib/main-example.dart\n'
              '\n'
              'ASSET_PREFIX=example\n'
              'BUNDLE_NAME=Example App\n'
              ''
     Which: is different.
            Expected: ... xcconfig"\r\n\r\nFLU ...
              Actual: ... xcconfig"\n\nFLUTTER ...
                                    ^
             Differ at offset 30

  package:test_api                                   expect
  package:flutter_test/src/widget_tester.dart 348:3  expect
  processors\ios\xcconfig_processor_test.dart 38:5   main.<fn>

A quick beginner question regarding flutter_flavorizr

Hey there,
Really liked this flutter_flavorizr package to build flavours in Flutter. πŸ‘
I had one quick question: You have shown flavours in two different apps: Apple app and Banana app. Can you please tell how can we implement flavours on the same application. Like I need two different environments i.e. prod and dev environment for one single application. Do I need to make two different Firebase projects for running it in two different environments? And if yes, how can I add a same project as two different Firebase projects for getting two different appIds and Bundleids?
Would be great if you could guide! πŸ˜„

I'm getting issue when run flutter pub run flutter_flavorizr

Running AndroidTargetFirebaseProcessor
Running NewFolderProcessor: Creating directory android/app/src/uat
Running Copying file from .firebase/uat/google-services.json to android/app/src/uat/google-services.json
Unhandled exception:
FileSystemException: Cannot copy file to 'android/app/src/uat/google-services.json', path = '.firebase/uat/google-services.json' (OS Error: No such file or directory, errno = 2)
#0 _File.throwIfError (dart:io/file_impl.dart:635:7)
#1 _File.copySync (dart:io/file_impl.dart:340:5)
#2 CopyFileProcessor.execute (package:flutter_flavorizr/processors/commons/copy_file_processor.dart:37:26)
#3 QueueProcessor.execute (package:flutter_flavorizr/processors/commons/queue_processor.dart:39:17)
#4 QueueProcessor.execute (package:flutter_flavorizr/processors/commons/queue_processor.dart:39:17)
#5 QueueProcessor.execute (package:flutter_flavorizr/processors/commons/queue_processor.dart:39:17)
#6 Processor.execute (package:flutter_flavorizr/processors/processor.dart:106:24)

pub finished with exit code 255

Multiple commands produce GoogleService-Info.plist

Hi,
I have 2 different flavors with different firebase configs. It works flawlessly in Android.

But I can't able to build the app in Xcode as it throws Multiple commands produce GoogleService-Info.plist error. Heres the error

Multiple commands produce '/Users/rameshvel/Library/Developer/Xcode/DerivedData/Runner-gqmldwjuahwuwkgijmfokisjscam/Build/Products/Debug-AppleApp-iphonesimulator/Runner.app/GoogleService-Info.plist':
1) Target 'Runner' (project 'Runner') has copy command from '/Users/rameshvel/work/storeJam/modernkirana/apps/customer/ios/Runner/OrangeApp/GoogleService-Info.plist' to '/Users/rameshvel/Library/Developer/Xcode/DerivedData/Runner-gqmldwjuahwuwkgijmfokisjscam/Build/Products/Debug-AppleApp-iphonesimulator/Runner.app/GoogleService-Info.plist'
2) Target 'Runner' (project 'Runner') has copy command from '/Users/rameshvel/work/storeJam/modernkirana/apps/customer/ios/Runner/AppleApp/GoogleService-Info.plist' to '/Users/rameshvel/Library/Developer/Xcode/DerivedData/Runner-gqmldwjuahwuwkgijmfokisjscam/Build/Products/Debug-AppleApp-iphonesimulator/Runner.app/GoogleService-Info.plist'

A quick look at the copy bundle resource in the build phase revealed that flutter_flavorizr added a copy phase for GoogleService-Info.plist for both the flavors.

I know I can remove just a unused flavor and add it back when I am building that one. Is there a simple way?

Different Application ID with Flavours and Mode

I have two flavors i.e.

  1. Apple
  2. Banana
    now suppose for Banana flavor , if I want to set application id different for release and debug mode is it possible?
    means e.g.
    For Release I want to set app.example.r
    For Debug I want to set app.example.d

Project does not build in ios

Hello,

I create 2 flavors, and added just this dependency:

  firebase_core: "^0.5.0"
  cloud_firestore: ^0.14.0+2

When i try to run, i get this error.

flutter run --flavor dev -t lib/main-dev.dart

    diff: /Podfile.lock: No such file or directory
    diff: /Manifest.lock: No such file or directory
    error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
    note: Using new build system
    note: Planning build
    note: Constructing build description

When i run just flutter run works normally.

Problem with build apk in release mode [also in example]

Hi! I have tried to build an apk from a flavor but it fails. Because of I thought it was my fault I made a new project from scratch with flutter create, added the flutter_flavorizr dependency and ran flutter pub run flutter_flavorizr.
With this setup if I run the command flutter build apk --flavor banana -t lib/main-banana.dart it works well but if I try to build the other flavor (flutter build apk --flavor apple -t lib/main-apple.dart) it fails. Here are the traces:

FAILURE: Build failed with an exception.                                
                                                                        
* What went wrong:                                                      
Execution failed for task ':app:lintVitalAppleRelease'.                 
> Could not resolve all artifacts for configuration ':app:bananaReleaseRuntimeClasspath'.
   > Failed to transform libs.jar to match attributes {artifactType=processed-jar, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
      > Execution failed for JetifyTransform: /Users/jfb/Development/test_project/build/app/intermediates/flutter/bananaRelease/libs.jar.
         > Transform's input file does not exist: /Users/jfb/Development/test_project/build/app/intermediates/flutter/bananaRelease/libs.jar.

It seems that try to find in the intermediates files a file corresponding to the banana flavor, not apple.

Am I doing something wrong? Thanks in advance.

IOS build

I able to run app using flutter, but Im not able to build it, or run it via xcode. Android is working just fine.
I also checked example inside this repository and it worked fine, so I believe this issue applies to my project. This plugin was introduced to existing app.

flutter run -d 00008030-0006441114C0802E --flavor beta -t lib/main-beta.dart

this is not working
flutter build apk --flavor beta -t lib/main-beta.dart
or this
flutter build apk --release --flavor beta -t lib/main-beta.dart

[βœ“] Flutter (Channel stable, 1.20.4, on Mac OS X 10.15.6 19G73, locale en-US)
 
[βœ“] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
[βœ“] Xcode - develop for iOS and macOS (Xcode 12.0)
[βœ“] Android Studio (version 4.0)
[βœ“] VS Code (version 1.49.1)
[βœ“] Connected device (1 available)

output

Running pod install...                                              4.2s
Running Xcode build...                                                  
                                                   
Xcode build done.                                           14.5s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    /Users/midiflow/.pub-cache/hosted/pub.dartlang.org/video_thumbnail-0.2.2/ios/Classes/VideoThumbnailPlugin.m:60:94: warning: values of
    type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead [-Wformat]
                    result( [FlutterError errorWithCode:[NSString stringWithFormat:@"Error %ld", error.code]
                                                                                           ~~~   ^~~~~~~~~~
                                                                                           %ld   (long)
    1 warning generated.
    /Users/midiflow/.pub-cache/hosted/pub.dartlang.org/file_picker-2.0.0/ios/Classes/FilePickerPlugin.m:93:125: warning: incompatible
    pointer to integer conversion sending 'id _Nullable' to parameter of type 'BOOL' (aka 'signed char') [-Wint-conversion]
            [self resolvePickMedia:[FileUtils resolveMediaType:call.method] withMultiPick:isMultiplePick withCompressionAllowed:[arguments
            valueForKey:@"allowCompression"]];
                                                                                                                                ^~~~~~~~~~~~
                                                                                                                                ~~~~~~~~~~~~
                                                                                                                                ~~~~~~~~~~~~
                                                                                                                                ~~~~~~~
    /Users/midiflow/.pub-cache/hosted/pub.dartlang.org/file_picker-2.0.0/ios/Classes/FilePickerPlugin.m:129:102: note: passing argument to
    parameter 'allowCompression' here
    - (void) resolvePickMedia:(MediaType)type withMultiPick:(BOOL)multiPick withCompressionAllowed:(BOOL)allowCompression  {
                                                                                                         ^
    1 warning generated.
    /Users/midiflow/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:190:43: warning:
    'FIRMessagingRemoteMessage' is deprecated: FCM direct channel is deprecated, please use APNs for downstream message handling.
    [-Wdeprecated-declarations]
    - (void)applicationReceivedRemoteMessage:(FIRMessagingRemoteMessage *)remoteMessage {
                                              ^
    In module 'FirebaseMessaging' imported from /Users/midiflow/workspace/mobile/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
    /Users/midiflow/workspace/mobile/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FIRMessaging.h:219:1: note:
    'FIRMessagingRemoteMessage' has been explicitly marked deprecated here
    __deprecated_msg(
    ^
    In module 'UIKit' imported from /Users/midiflow/workspace/mobile/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    In module 'Foundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/UIKit.f
    ramework/Headers/UIKit.h:8:
    In module 'CoreFoundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundat
    ion.framework/Headers/Foundation.h:6:
    In module 'Darwin' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/CoreFou
    ndation.framework/Headers/CoreFoundation.h:16:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/usr/include/sys/cdefs.h:200:48:
    note: expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    /Users/midiflow/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:290:24: warning:
    'FIRMessagingRemoteMessage' is deprecated: FCM direct channel is deprecated, please use APNs for downstream message handling.
    [-Wdeprecated-declarations]
        didReceiveMessage:(FIRMessagingRemoteMessage *)remoteMessage {
                           ^
    In module 'FirebaseMessaging' imported from /Users/midiflow/workspace/mobile/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
    /Users/midiflow/workspace/mobile/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FIRMessaging.h:219:1: note:
    'FIRMessagingRemoteMessage' has been explicitly marked deprecated here
    __deprecated_msg(
    ^
    In module 'UIKit' imported from /Users/midiflow/workspace/mobile/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    In module 'Foundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/UIKit.f
    ramework/Headers/UIKit.h:8:
    In module 'CoreFoundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundat
    ion.framework/Headers/Foundation.h:6:
    In module 'Darwin' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/CoreFou
    ndation.framework/Headers/CoreFoundation.h:16:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/usr/include/sys/cdefs.h:200:48:
    note: expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    /Users/midiflow/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:136:30: warning:
    'shouldEstablishDirectChannel' is deprecated: FCM direct channel is deprecated, please use APNs channel for downstream message delivery.
    [-Wdeprecated-declarations]
        [FIRMessaging messaging].shouldEstablishDirectChannel = true;
                                 ^
    In module 'FirebaseMessaging' imported from /Users/midiflow/workspace/mobile/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
    /Users/midiflow/workspace/mobile/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FIRMessaging.h:283:56: note:
    'shouldEstablishDirectChannel' has been explicitly marked deprecated here
    @property(nonatomic) BOOL shouldEstablishDirectChannel DEPRECATED_MSG_ATTRIBUTE(
                                                           ^
    In module 'UIKit' imported from /Users/midiflow/workspace/mobile/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    In module 'Foundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/UIKit.f
    ramework/Headers/UIKit.h:8:
    In module 'CoreFoundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundat
    ion.framework/Headers/Foundation.h:6:
    In module 'Darwin' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/CoreFou
    ndation.framework/Headers/CoreFoundation.h:16:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/usr/include/AvailabilityMacros.h:
    181:64: note: expanded from macro 'DEPRECATED_MSG_ATTRIBUTE'
                #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s)))
                                                                   ^
    /Users/midiflow/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:191:52: warning:
    'appData' is deprecated [-Wdeprecated-declarations]
      [self didReceiveRemoteNotification:remoteMessage.appData];
                                                       ^
    In module 'FirebaseMessaging' imported from /Users/midiflow/workspace/mobile/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
    /Users/midiflow/workspace/mobile/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FIRMessaging.h:226:62: note: 'appData' has
    been explicitly marked deprecated here
    @property(nonatomic, readonly, strong) NSDictionary *appData DEPRECATED_ATTRIBUTE;
                                                                 ^
    In module 'UIKit' imported from /Users/midiflow/workspace/mobile/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    In module 'Foundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/UIKit.f
    ramework/Headers/UIKit.h:8:
    In module 'CoreFoundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundat
    ion.framework/Headers/Foundation.h:6:
    In module 'Darwin' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/CoreFou
    ndation.framework/Headers/CoreFoundation.h:16:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/usr/include/AvailabilityMacros.h:
    179:60: note: expanded from macro 'DEPRECATED_ATTRIBUTE'
            #define DEPRECATED_ATTRIBUTE        __attribute__((deprecated))
                                                               ^
    /Users/midiflow/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:289:1: warning:
    implementing deprecated method [-Wdeprecated-implementations]
    - (void)messaging:(FIRMessaging *)messaging
    ^
    In module 'FirebaseMessaging' imported from /Users/midiflow/workspace/mobile/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
    /Users/midiflow/workspace/mobile/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FIRMessaging.h:253:1: note: method
    'messaging:didReceiveMessage:' declared here
    - (void)messaging:(FIRMessaging *)messaging
    ^
    /Users/midiflow/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:291:63: warning:
    'appData' is deprecated [-Wdeprecated-declarations]
      [_channel invokeMethod:@"onMessage" arguments:remoteMessage.appData];
                                                                  ^
    In module 'FirebaseMessaging' imported from /Users/midiflow/workspace/mobile/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
    /Users/midiflow/workspace/mobile/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FIRMessaging.h:226:62: note: 'appData' has
    been explicitly marked deprecated here
    @property(nonatomic, readonly, strong) NSDictionary *appData DEPRECATED_ATTRIBUTE;
                                                                 ^
    In module 'UIKit' imported from /Users/midiflow/workspace/mobile/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    In module 'Foundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/UIKit.f
    ramework/Headers/UIKit.h:8:
    In module 'CoreFoundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundat
    ion.framework/Headers/Foundation.h:6:
    In module 'Darwin' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/CoreFou
    ndation.framework/Headers/CoreFoundation.h:16:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/usr/include/AvailabilityMacros.h:
    179:60: note: expanded from macro 'DEPRECATED_ATTRIBUTE'
            #define DEPRECATED_ATTRIBUTE        __attribute__((deprecated))
                                                               ^
    6 warnings generated.
    /Users/midiflow/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:190:43: warning:
    'FIRMessagingRemoteMessage' is deprecated: FCM direct channel is deprecated, please use APNs for downstream message handling.
    [-Wdeprecated-declarations]
    - (void)applicationReceivedRemoteMessage:(FIRMessagingRemoteMessage *)remoteMessage {
                                              ^
    In module 'FirebaseMessaging' imported from /Users/midiflow/workspace/mobile/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
    /Users/midiflow/workspace/mobile/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FIRMessaging.h:219:1: note:
    'FIRMessagingRemoteMessage' has been explicitly marked deprecated here
    __deprecated_msg(
    ^
    In module 'UIKit' imported from /Users/midiflow/workspace/mobile/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    In module 'Foundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/UIKit.f
    ramework/Headers/UIKit.h:8:
    In module 'CoreFoundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundat
    ion.framework/Headers/Foundation.h:6:
    In module 'Darwin' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/CoreFou
    ndation.framework/Headers/CoreFoundation.h:16:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/usr/include/sys/cdefs.h:200:48:
    note: expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    /Users/midiflow/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:290:24: warning:
    'FIRMessagingRemoteMessage' is deprecated: FCM direct channel is deprecated, please use APNs for downstream message handling.
    [-Wdeprecated-declarations]
        didReceiveMessage:(FIRMessagingRemoteMessage *)remoteMessage {
                           ^
    In module 'FirebaseMessaging' imported from /Users/midiflow/workspace/mobile/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
    /Users/midiflow/workspace/mobile/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FIRMessaging.h:219:1: note:
    'FIRMessagingRemoteMessage' has been explicitly marked deprecated here
    __deprecated_msg(
    ^
    In module 'UIKit' imported from /Users/midiflow/workspace/mobile/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    In module 'Foundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/UIKit.f
    ramework/Headers/UIKit.h:8:
    In module 'CoreFoundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundat
    ion.framework/Headers/Foundation.h:6:
    In module 'Darwin' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/CoreFou
    ndation.framework/Headers/CoreFoundation.h:16:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/usr/include/sys/cdefs.h:200:48:
    note: expanded from macro '__deprecated_msg'
            #define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
                                                          ^
    /Users/midiflow/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:136:30: warning:
    'shouldEstablishDirectChannel' is deprecated: FCM direct channel is deprecated, please use APNs channel for downstream message delivery.
    [-Wdeprecated-declarations]
        [FIRMessaging messaging].shouldEstablishDirectChannel = true;
                                 ^
    In module 'FirebaseMessaging' imported from /Users/midiflow/workspace/mobile/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
    /Users/midiflow/workspace/mobile/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FIRMessaging.h:283:56: note:
    'shouldEstablishDirectChannel' has been explicitly marked deprecated here
    @property(nonatomic) BOOL shouldEstablishDirectChannel DEPRECATED_MSG_ATTRIBUTE(
                                                           ^
    In module 'UIKit' imported from /Users/midiflow/workspace/mobile/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    In module 'Foundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/UIKit.f
    ramework/Headers/UIKit.h:8:
    In module 'CoreFoundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundat
    ion.framework/Headers/Foundation.h:6:
    In module 'Darwin' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/CoreFou
    ndation.framework/Headers/CoreFoundation.h:16:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/usr/include/AvailabilityMacros.h:
    181:64: note: expanded from macro 'DEPRECATED_MSG_ATTRIBUTE'
                #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s)))
                                                                   ^
    /Users/midiflow/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:191:52: warning:
    'appData' is deprecated [-Wdeprecated-declarations]
      [self didReceiveRemoteNotification:remoteMessage.appData];
                                                       ^
    In module 'FirebaseMessaging' imported from /Users/midiflow/workspace/mobile/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
    /Users/midiflow/workspace/mobile/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FIRMessaging.h:226:62: note: 'appData' has
    been explicitly marked deprecated here
    @property(nonatomic, readonly, strong) NSDictionary *appData DEPRECATED_ATTRIBUTE;
                                                                 ^
    In module 'UIKit' imported from /Users/midiflow/workspace/mobile/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    In module 'Foundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/UIKit.f
    ramework/Headers/UIKit.h:8:
    In module 'CoreFoundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundat
    ion.framework/Headers/Foundation.h:6:
    In module 'Darwin' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/CoreFou
    ndation.framework/Headers/CoreFoundation.h:16:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/usr/include/AvailabilityMacros.h:
    179:60: note: expanded from macro 'DEPRECATED_ATTRIBUTE'
            #define DEPRECATED_ATTRIBUTE        __attribute__((deprecated))
                                                               ^
    /Users/midiflow/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:289:1: warning:
    implementing deprecated method [-Wdeprecated-implementations]
    - (void)messaging:(FIRMessaging *)messaging
    ^
    In module 'FirebaseMessaging' imported from /Users/midiflow/workspace/mobile/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
    /Users/midiflow/workspace/mobile/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FIRMessaging.h:253:1: note: method
    'messaging:didReceiveMessage:' declared here
    - (void)messaging:(FIRMessaging *)messaging
    ^
    /Users/midiflow/.pub-cache/hosted/pub.dartlang.org/firebase_messaging-7.0.0/ios/Classes/FLTFirebaseMessagingPlugin.m:291:63: warning:
    'appData' is deprecated [-Wdeprecated-declarations]
      [_channel invokeMethod:@"onMessage" arguments:remoteMessage.appData];
                                                                  ^
    In module 'FirebaseMessaging' imported from /Users/midiflow/workspace/mobile/ios/Pods/Headers/Public/Firebase/Firebase.h:72:
    /Users/midiflow/workspace/mobile/ios/Pods/FirebaseMessaging/FirebaseMessaging/Sources/Public/FIRMessaging.h:226:62: note: 'appData' has
    been explicitly marked deprecated here
    @property(nonatomic, readonly, strong) NSDictionary *appData DEPRECATED_ATTRIBUTE;
                                                                 ^
    In module 'UIKit' imported from /Users/midiflow/workspace/mobile/ios/Pods/Target Support
    Files/firebase_messaging/firebase_messaging-prefix.pch:2:
    In module 'Foundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/UIKit.f
    ramework/Headers/UIKit.h:8:
    In module 'CoreFoundation' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundat
    ion.framework/Headers/Foundation.h:6:
    In module 'Darwin' imported from
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/CoreFou
    ndation.framework/Headers/CoreFoundation.h:16:
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/usr/include/AvailabilityMacros.h:
    179:60: note: expanded from macro 'DEPRECATED_ATTRIBUTE'
            #define DEPRECATED_ATTRIBUTE        __attribute__((deprecated))
                                                               ^
    6 warnings generated.
    ld: warning: dylib (/Users/midiflow/workspace/mobile/build/ios/Release
    beta-iphoneos/DKImagePickerController/DKImagePickerController.framework/DKImagePickerController) was built for newer iOS version (9.0)
    than being linked (8.0)
    ld: warning: dylib (/Users/midiflow/workspace/mobile/build/ios/Release
    beta-iphoneos/DKPhotoGallery/DKPhotoGallery.framework/DKPhotoGallery) was built for newer iOS version (9.0) than being linked (8.0)
    ld: warning: dylib (/Users/midiflow/workspace/mobile/build/ios/Release
    beta-iphoneos/DKImagePickerController/DKImagePickerController.framework/DKImagePickerController) was built for newer iOS version (9.0)
    than being linked (8.0)
    ld: warning: dylib (/Users/midiflow/workspace/mobile/build/ios/Release
    beta-iphoneos/DKPhotoGallery/DKPhotoGallery.framework/DKPhotoGallery) was built for newer iOS version (9.0) than being linked (8.0)
    /Users/midiflow/.pub-cache/hosted/pub.dartlang.org/websocket_manager-0.2.2/ios/Classes/WebsocketManagerPlugin.m:6:4: warning:
    'SwiftWebsocketManagerPlugin' is only available on iOS 9.0 or newer [-Wunguarded-availability]
      [SwiftWebsocketManagerPlugin registerWithRegistrar:registrar];
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from /Users/midiflow/.pub-cache/hosted/pub.dartlang.org/websocket_manager-0.2.2/ios/Classes/WebsocketManagerPlugin.m:2:
    /Users/midiflow/workspace/mobile/build/ios/Release
    beta-iphoneos/websocket_manager/websocket_manager.framework/Headers/websocket_manager-Swift.h:216:12: note:
    'SwiftWebsocketManagerPlugin' has been marked as being introduced in iOS 9.0 here, but the deployment target is iOS 8.0.0
    @interface SwiftWebsocketManagerPlugin : NSObject <FlutterPlugin>
               ^
    /Users/midiflow/.pub-cache/hosted/pub.dartlang.org/websocket_manager-0.2.2/ios/Classes/WebsocketManagerPlugin.m:6:4: note: enclose
    'SwiftWebsocketManagerPlugin' in an @available check to silence this warning
      [SwiftWebsocketManagerPlugin registerWithRegistrar:registrar];
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 warning generated.
    /Users/midiflow/.pub-cache/hosted/pub.dartlang.org/websocket_manager-0.2.2/ios/Classes/WebsocketManagerPlugin.m:6:4: warning:
    'SwiftWebsocketManagerPlugin' is only available on iOS 9.0 or newer [-Wunguarded-availability]
      [SwiftWebsocketManagerPlugin registerWithRegistrar:registrar];
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from /Users/midiflow/.pub-cache/hosted/pub.dartlang.org/websocket_manager-0.2.2/ios/Classes/WebsocketManagerPlugin.m:2:
    /Users/midiflow/workspace/mobile/build/ios/Release
    beta-iphoneos/websocket_manager/websocket_manager.framework/Headers/websocket_manager-Swift.h:442:12: note:
    'SwiftWebsocketManagerPlugin' has been marked as being introduced in iOS 9.0 here, but the deployment target is iOS 8.0.0
    @interface SwiftWebsocketManagerPlugin : NSObject <FlutterPlugin>
               ^
    /Users/midiflow/.pub-cache/hosted/pub.dartlang.org/websocket_manager-0.2.2/ios/Classes/WebsocketManagerPlugin.m:6:4: note: enclose
    'SwiftWebsocketManagerPlugin' in an @available check to silence this warning
      [SwiftWebsocketManagerPlugin registerWithRegistrar:registrar];
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 warning generated.
    This application cannot tree shake icons fonts. It has non-constant instances of IconData at the following locations:
      - file:///Users/midiflow/workspace/mobile/lib/screens/home_screen.dart:231:31

    Command PhaseScriptExecution failed with a nonzero exit code
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Constructing build description
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'SwiftyGif' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'libwebp' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'SDWebImage' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'PhoneNumberKit' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'Starscream' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'Protobuf' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'nanopb' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'PromisesObjC' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'image_picker' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'path_provider' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'flutter_keyboard_visibility' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'device_info' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'url_launcher' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'video_player' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'shared_preferences' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'wakelock' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'share' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'permission_handler' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'video_thumbnail' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'phone_number' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'websocket_manager' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'GoogleDataTransport' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'GoogleUtilities' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'FirebaseCoreDiagnostics' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'file_picker' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'FirebaseCore' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'FirebaseInstallations' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'FirebaseDynamicLinks' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'FirebaseInstanceID' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'FirebaseMessaging' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'firebase_core' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'firebase_messaging' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'firebase_dynamic_links' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'firebase_analytics' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'FirebaseCoreDiagnosticsInterop' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'Flutter' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'FirebaseAnalytics' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'GoogleAppMeasurement' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'Firebase' from project 'Pods')
    warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is
    9.0 to 14.0.99. (in target 'FirebaseAnalyticsInterop' from project 'Pods')

Encountered error while building for device.

json_annotation dependency upgrade?

I know the full upgrade to null safety may be difficult due to build_runner, but is it possible to partially upgrade by upgrading for json_annotation ^4.0.1? It's helpful with the freezed lib upgrade.

Thank you very much for the awesome package.

thanks!

hey a quick thank you! this saved us a ton of time and auto-configured things flawlessly in a 1.20+ existing app that we're now white labeling. great work πŸ‘

Issue with Flutter 1.20 channel beta and xml plugin.

I have upgraded my flutter version to 1.20 channel beta, and I had to upgrade flutter_svg plugin to 0.18.0 to resolve the error.

Then that plugin flutter_svg comes with another plugin xml whose version is 4.3.0. But yours has xml version with version ^3.6.1 which cause pub get to fail with the following conflict.

Because no versions of flutter_flavorizr match >1.0.3 <2.0.0 and flutter_flavorizr 1.0.3 depends on xml ^3.6.1, flutter_flavorizr ^1.0.3 requires xml ^3.6.1.
And because flutter_svg >=0.18.0 depends on xml ^4.1.0, flutter_flavorizr ^1.0.3 is incompatible with flutter_svg >=0.18.0.
So, because MyApp depends on both flutter_svg ^0.18.0 and flutter_flavorizr ^1.0.3, version solving failed.
pub get failed (1; So, because MyApp depends on both flutter_svg ^0.18.0 and flutter_flavorizr ^1.0.3, version solving failed.)

Can you please urgently update xml plugin to 4.3.0 and make a hot-fix release?

Build flavors with different Firebase projects

Awesome package! @AngeloAvv , here's my suggestion for multiple firebase integration.

flavorizr:
  flavors:
    prod:
      firebase_config: creds/GoogleService-Info_Production.plist
      app_id: "com.example.prod"
    dev:
      firebase_config: creds/GoogleService-Info_Development.plist
      app_id: "com.example.dev"

with this config, the preprocessor can directly copy the creds plist to both ios and android path during build. and also i wish that there's a global app_id that can configure for both of the platform, thanks.

error while building ios, bitcode is not disabled

I think because those lines were removed from podfile after I run flavorizr, its not longer working properly

    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end

error

prod-iphoneos/DKImagePickerController/DKImagePickerController.framework/DKImagePickerController' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode
    setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. file '/Users/midiflow/workspace/mobile/build/ios/Debug
    prod-iphoneos/DKImagePickerController/DKImagePickerController.framework/DKImagePickerController' for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have too disable bitcode manually for each schema

Custom Icon and splash screen

It would be awesome to add dynamic icon and splash screen support as well πŸŽ‰

https://pub.dev/packages/flutter_native_splash
https://pub.dev/packages/flutter_launcher_icons

flavorizr:
  flavors:
    apple:
      app:
        name: "Apple App"

      android:
        applicationId: "com.example.apple"
        icon: "assets/images/apple_icon.png"
        firebase:
          config: ".firebase/apple/google-services.json"

      ios:
        bundleId: "com.example.apple"
        icon: "assets/images/apple_icon.png"
        firebase:
          config: ".firebase/apple/GoogleService-Info.plist"

Gradle build failed to produce an .apk file. It's likely that this file was generated under

flutter run --flavor FlavorA -t lib/main-FlavorA.dart --verbose

output
Exception: Gradle build failed to produce an .apk file. It's likely that this file was generated under /home/harlock/Documents/projetos/treino/build, but the tool couldn't find it.

flutter doctor -v

[βœ“] Flutter (Channel unknown, 1.20.0, on Linux, locale pt_BR.UTF-8)
β€’ Flutter version 1.20.0 at /home/harlock/development/flutter
β€’ Framework revision 840c9205b3 (5 weeks ago), 2020-08-04 20:55:12 -0700
β€’ Engine revision c8e3b94853
β€’ Dart version 2.9.0

[βœ“] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
β€’ Android SDK at /home/harlock/Android/Sdk
β€’ Platform android-30, build-tools 30.0.1
β€’ Java binary at: /home/harlock/android-studio/jre/bin/java
β€’ Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
β€’ All Android licenses accepted.

[βœ“] Android Studio (version 4.0)
β€’ Android Studio at /home/harlock/android-studio
β€’ Flutter plugin version 48.0.2
β€’ Dart plugin version 193.7361
β€’ Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[βœ“] VS Code (version 1.48.2)
β€’ VS Code at /usr/share/code
β€’ Flutter extension version 3.14.0

[βœ“] Connected device (1 available)
β€’ Mi 9 Lite (mobile) β€’ 77b94361 β€’ android-arm64 β€’ Android 10 (API 29)

β€’ No issues found!

Archiving not working correctly

Hello @AngeloAvv, awesome package! it is very useful!

I configured correctly in android and i am able to create two different apk with different identifiers.
But the same thing is not happening on ios. if i try to archive with apple scheme, it will arhive successfuly but he is taking the identifiers of banana.
how can i create 2 different archive for banana and apple?

No iOS simulators/devices showing up for flavor schemes in Xcode

I just created a fresh flutter project and set up flutter_flavorizr according to the steps described in the README.md. I set up two flavors "apple" and "banana".
The app runs fine on Android and also on iOS simulator using the flutter run ... command from a terminal.

However, when opening the ios/ folder in Xcode I am not able to run/build the "apple" or "banana" scheme. I don't get any devices displayed for the two flavor schemes (image showing apple scheme):
image

When trying the default "Runner" scheme simulators are displayed just like normal:
image

Also following the advice of #17 (comment) didn't help with this problem.

Does anyone have any hint?

Cannot open file, path = '.tmp/ios/firebaseScript.sh'

Hello, thanks for this package, it saved me a lot of time.

I try to add firebase to an existing project and I get this error.

obs. GoogleService-Info.plist has been successfully copied to the iOS project.

Running FileProcessor: writing file ios/Runner/GoogleService-Info.plist with nested EmptyFileProcessor Running ShellProcessor: Running script 'ruby' with arguments .tmp/scripts/ios/add_file.rb, ios/Runner.xcodeproj, Runner/GoogleService-Info.plist Running FileProcessor: writing file .tmp/ios/firebaseScript.sh with nested IOSFirebaseScriptProcessor Unhandled exception: FileSystemException: Cannot open file, path = '.tmp/ios/firebaseScript.sh' (OS Error: No such file or directory, errno = 2) #0 _File.throwIfError (dart:io/file_impl.dart:635:7) #1 _File.openSync (dart:io/file_impl.dart:479:5) #2 _File.writeAsBytesSync (dart:io/file_impl.dart:604:31) #3 _File.writeAsStringSync (dart:io/file_impl.dart:628:5) #4 AbstractFileStringProcessor.execute (package:flutter_flavorizr/processors/commons/abstract_file_string_processor.dart:40:15) #5 QueueProcessor.execute (package:flutter_flavorizr/processors/commons/queue_processor.dart:39:17) #6 QueueProcessor.execute (package:flutter_flavorizr/processors/commons/queue_processor.dart:39:17) #7 Processor.execute (package:flutter_flavorizr/processors/processor.dart:106:24) #8 execute (package:flutter_flavorizr/flutter_flavorizr.dart:54:13) #9 main (file:///Users/rodrigo/Documents/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_flavorizr-2.0.0/bin/flutter_flavorizr.dart:4:3) #10 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:281:32) #11 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12) pub finished with exit code 255

flutter web

hello dear
Do you have any plans to support flutter web ?

Adding new flavors without overriding existing ones

Thanks for this great library.

I was wondering if it's possible to add new flavors without rewriting files for existing flavors?

If we have apple and banana and wanted to add orange, can we create orange in isolation without re-writing the assets for banana and apple?

Configure generated file location

Hello!
I'm creating a Clean Architecture based app and I want to organize the generated files in custom folders. Would be very nice if we could add new properties at app level to customize our output file location

Small issue: blank line added to build.gradæe every time I run the script

Description

Every time I run the script a blank line is added at the very end of the android/app/build.gradle file.
Nothing critical but it could be annoying to have that file becoming very long due to blank lines after many executions.

Steps to reproduce

I ran the script a first time with these configurations:

flavorizr:
  app:
    android:
      flavorDimensions: "flavor-type"
    ios:

  flavors:
    dev:
      app:
        name: "AppName - Dev"
      android:
        applicationId: "app.web.domain.dev"
      ios:
        bundleId: "app.web.domain.dev"

    testing:
      app:
        name: "AppName - Test"
      android:
        applicationId: "app.web.domain.testing"
      ios:
        bundleId: "app.web.domain.testing"

    prod:
      app:
        name: "AppName"
      android:
        applicationId: "app.web.domain"
      ios:
        bundleId: "app.web.domain"

And I committed the changes removing manually the blank line at the end of the android/app/build.gradle file.

Then I ran it a second time to add the Firebase configuration to the dev flavor:

flavorizr:
  app:
    android:
      flavorDimensions: "flavor-type"
    ios:

  flavors:
    dev:
      app:
        name: "AppName - Dev"
      android:
        applicationId: "app.web.domain.dev"
        firebase:
          config: ".firebase/dev/google-services.json"
      ios:
        bundleId: "app.web.domain.dev"

    testing:
      app:
        name: "AppName - Test"
      android:
        applicationId: "app.web.domain.testing"
      ios:
        bundleId: "app.web.domain.testing"

    prod:
      app:
        name: "AppName"
      android:
        applicationId: "app.web.domain"
      ios:
        bundleId: "app.web.domain"

And I noticed that a new blank line was added. This time I left it there and I run again one time the script to add the Firebase configs to the test flavor. And again a new blank line was added.
So I run a third time the script to add the Firebase configs for the prod flavor and a fourth time without adding anything new.

These are two screenshot, taken after the four consecutive executions of the script, to show where the lines are added
Screenshot 2021-05-01 at 11 43 33
Screenshot 2021-05-01 at 11 43 57

xml ^3.6.1

dependencies such as flutter_svg depend on xml ^4.1.0
while flutter_flavorizr depends on xml ^3.6.1
because [your app] depends on both version solving failed

Problem When Releasing with Flavours

When i am trying to run my app with flavours via flutter run --flavor -t lib/main-.dart it is working fine but when i am trying to release build i have encountered the following error

Gradle build failed to produce an .apk file. It's likely that this file was generated under Path , but the tool couldn't find it.

how to customize app icon (both android and IOS)?

I posted in here as well:
https://stackoverflow.com/questions/62439565/flutter-variant-flavors-using-flutter-flavorizr-how-to-customize-app-icon-bot

I am trying to figure out how to use flutter_flavorizr to make different variant apps with the same code based.

Here are some documentations that I have been trying to refer: https://pub.dev/packages/flutter_flavorizr#-readme-tab- https://medium.com/@angeloavv/easily-build-flavors-in-flutter-android-and-ios-with-flutter-flavorizr-d48cbf956e4

So far, I cant find much information/example detailing on customizing the app icon for the different apps (essentially its needed for both Android and IOS).

My question is how can I use flutter_flavorizr to customize the appicons for the different variant apps ? Is that possible

How to build specifically for android only

The documentation says that we need to run a custom set of instructions to build specifically for android. But I couldn't find those anywhere. Its a pretty good library and I want to use it but cant find the instructions

Different assets for flavors

Hi,

I have 5 flavours and each flavor has a big background image.
I have "assets/" folder in my project with the 5 images and when I compile one flavour it contains all the background of all apps.

how can I set assets only for specific flavor?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.