So I am trying to setup flavors in the iOS app of my Flutter project. My aim is to be able to have multiple flavors of the app simultaneously installed on my iPhone.
In order to achieve this, I stumbled upon this official guide: https://docs.flutter.dev/deployment/flavors.
But I have encountered issues where the app ended up being named "Runner" and I could not even have multiple apps installed on my iPhone.
Let's start at the beginning.
I have 3 flavors (schemes):
dev,mr, andprod.
Each are defined for Debug, Profile and Release and I have removed the original ones.
Next step, the guide shows how to define unique bundle identifier for each scheme which in my case are as follow:
Then we move on to the Product Name and I did exactly like the guide:

Last step is to edit some fields in the Info.plist.
This is where the guide is very confusing, because it says to set ${PRODUCT_NAME} to Bundle Display Name however, in the following screenshot it clearly says CF Bundle Display Name. I tried to find the latter in Xcode but there is no such choice when browsing available keys ("+" button next to "Information Property List").
Then I opened Info.plist in Android studio to write the following keys:
<key>CFBundleDisplayName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleName</key>
<string>My Flutter App</string>
Back to Xcode, this is how it looks like now:

Unless I am wrong, to my understanding:
CFBundleDisplayNamecorresponds toBundle Display Namefrom the written text in the guide,- while
Bundle Display Namefrom the guide's screenshot corresponds toBundle Namein myInfo.plist(orCFBundleNamein the raw version).
Then I try to build the app with the dev flavor:

But on my iPhone running iOS 12, the app is titled "Runner". Then, if I use the main.dart (mr) build config (which uses the mr flavor), the new build replaces the existing one, and it is still named "Runner".
So I believe that:
- the naming does not work
- the flavor system does not work as well.
Also what further confuses me, is why the guide asked to write Product Names such as "Debug Free" (or Debug Dev in my example) ??? Is that supposed to be the app name ? I am not actually looking for different names at the moment, but I want to be able to have the three flavored apps installed on my iPhone.
What am I doing wrong?
Note: the flavors system worked perfectly fine on Android



I have experienced this too. The tutorial only said to change in Project level. However, when I check at Target level, the product name is set to "Runner". Hence, all the product name will be named as Runner.
So I changed the target product name to $(PRODUCT_NAME). Then, it will properly use the PRODUCT_NAME value from the Project level.