Thanks for the tutorial! This really saves me a lot of time for setup different env in my flutter project For ppl who have multiple googleservice-info.plist file in iOS, you may get error "Error (Xcode): Multiple commands produce" pointing to your GoogleService-info.plist. Just remove the GoogleService-info.plist in "Copy Bundle Resources", (as the script provided by author will add the plist file during build time)
Thank you! Quick question: in "Copy Bundle Resources" I have GoogleService-info.plist in config/dev, config/prod, and in Runner. Should I remove them all?
I keep getting this error Error (Xcode): Target aot_assembly_release failed: Exception: release/profile builds are only supported for physical devices. attempted to build for simulator. Could not build the application for the simulator. Error launching application on iPad Air 11-inch (M2).
You did not specify adding configuration file to a scheme and what to write in it? Is it even required or changing api_url from flutter project is sufficient.
i faced "No such module Flutter" or "No such module GoogleMaps", i believe follow all your step correctly, it is because i did it on existing project ? please help
When I run the production build I get an error that module camera_avfoundation is not found. Could I have set something up wrong? I’m only getting it on the production build and not the dev build
how did you connect the projects with firebase as separate bundle ids ? by running flutterfire configure, firebase picks the default prod bundle id for my case. whichever flavor i run with the build command, it takes only one bundle id. note that i have registered my bundle id in xcode correctly.
Thanks so much for this video. The best so far. Please I have an error. Everything works fine until I added the run script and not sure why that throws an error of a build failure. The error is Command PhaseScriptExecution failed with a nonzero exit code. Any Idea how to resolve this?
@@musawwirmaqsood thanks for your reply, Can i have different feachers targeting each flavor,if yes having a condition in the code , would it slow the application ?
I get an error while running the project from xcode. It shows: "No file found: lib/main.dart" I tried adding "-t main_dev.dart" to the arguments in the schema, still I can't be able to build from xcode.
Open flutter app in XCode, goto project Runner and click on Build Settings and make sure all and combined are selected then search for FLUTTER_TARGET and here you can edit main file path according to your flavor.
I get an error while running the project from xcode. It shows: "No file found: lib/main.dart" I tried adding "-t main_dev.dart" to the arguments in the schema, still I can't be able to build from xcode.
this is the best flutter flavor tutorial so far
Thanks for the tutorial! This really saves me a lot of time for setup different env in my flutter project
For ppl who have multiple googleservice-info.plist file in iOS, you may get error "Error (Xcode): Multiple commands produce" pointing to your GoogleService-info.plist. Just remove the GoogleService-info.plist in "Copy Bundle Resources", (as the script provided by author will add the plist file during build time)
Thank you! This had been bugging me for hours
Thank you! Quick question: in "Copy Bundle Resources" I have GoogleService-info.plist in config/dev, config/prod, and in Runner. Should I remove them all?
Thanks a lot!!!!! This is the best flavors tutorial so far. Love it ❤
Glad it was helpful!❤
Excellent man plus more you should show by running from android studio vs code and xcode 🎉
Thank you man, I learnt lots of things here 👏👏👏
how can i manage it with github branches. if I have three branches in my github repo like prod-branch, dev-branch, staging-branch
I keep getting this error Error (Xcode): Target aot_assembly_release failed: Exception: release/profile builds are only supported for physical devices. attempted to build for simulator.
Could not build the application for the simulator.
Error launching application on iPad Air 11-inch (M2).
You did not specify adding configuration file to a scheme and what to write in it? Is it even required or changing api_url from flutter project is sufficient.
Great configuration video, short and efficient
How do we initialise the firebase database ? Without the firebase_options.dart ?
i faced "No such module Flutter" or "No such module GoogleMaps", i believe follow all your step correctly, it is because i did it on existing project ? please help
When I run the production build I get an error that module camera_avfoundation is not found. Could I have set something up wrong? I’m only getting it on the production build and not the dev build
so i need 2 firebase projects with flavors not just 1?
build input file cannot be found :( :(((((
When i running my app from xcode only the the flavor last builded with vs code will run.
Have you selected relevant scheme in XCode? For reference go to video at 0:41 sec.
@@musawwirmaqsood
I found the solution and i realy wonder why nobody talking about this.
Flutter Flavors Setup with multiple Firebase Environments using FlutterFire and CLI
how did you connect the projects with firebase as separate bundle ids ? by running flutterfire configure, firebase picks the default prod bundle id for my case. whichever flavor i run with the build command, it takes only one bundle id. note that i have registered my bundle id in xcode correctly.
Got any solution for that?
Thank you so much for the tutorial!
Thanks so much for this video. The best so far. Please I have an error. Everything works fine until I added the run script and not sure why that throws an error of a build failure. The error is
Command PhaseScriptExecution failed with a nonzero exit code. Any Idea how to resolve this?
I resolved this already. Thanks again!
@@codelate can you tell me how you resolved it?
@@codelate can you provide solution?
Can anyone tell me a way to solve this
This only applies to the Android and iOS or also to Web Flutter development?
using This method , can i uploade both of them to the store ios and android, with the different config
@@Ahmed-kf1ii yes, you can.
@@musawwirmaqsood thanks for your reply, Can i have different feachers targeting each flavor,if yes having a condition in the code , would it slow the application ?
@@Ahmed-kf1ii it won't slow the application but your app size will increase for sure.
@@musawwirmaqsood Make sence, so the assets would be for all the flavor it can not be configure
Do we need different SHA certificates for the different flavours?
No, we can use the same.
Man! Million thanks!
My name is M.Tayyab your video is ok ❤
Sir Kia app mjhy seekha sakty flutter plz mein disable person hon..agr app Ka koi course ho Kuch bhi jis sy mein flutter seekh sakon plzzz reply me
Thank you man
thank u brother
❤
hahaha you need more energy in your words xd but thanks
keep coding
I get an error while running the project from xcode. It shows: "No file found: lib/main.dart"
I tried adding "-t main_dev.dart" to the arguments in the schema, still I can't be able to build from xcode.
Open flutter app in XCode, goto project Runner and click on Build Settings and make sure all and combined are selected then search for FLUTTER_TARGET and here you can edit main file path according to your flavor.
How do we initialise the firebase database ? Without the firebase_options.dart ?
I get an error while running the project from xcode. It shows: "No file found: lib/main.dart"
I tried adding "-t main_dev.dart" to the arguments in the schema, still I can't be able to build from xcode.
shouldn't it be lib/main_dev.dart?