Reputation: 597
I'm getting this error when trying to build iOS app with flutter module injected in it. I added the FLUTTER_ROOT and flutter dependencies in pod are successfully installed but the build fails getting this error:
ERROR: Unknown FLUTTER_BUILD_MODE: vedur_dev.
Valid values are 'Debug', 'Profile', or 'Release' (case insensitive).
This is controlled by the FLUTTER_BUILD_MODE environment variable.
If that is not set, the CONFIGURATION environment variable is used.
You can fix this by either adding an appropriately named build
configuration, or adding an appropriate value for FLUTTER_BUILD_MODE to the
.xcconfig file for the current build configuration (Vedur_Dev).
I added FLUTTER_BUILD_MODE in User-Defined Settings in TARGETS App like this:
And assigned the values iOS understands. I clean the project, but getting exactly the same error.
I'm not sure where am I making a mistake.
Edit: App builds just fine without the module.
Upvotes: 2
Views: 2635
Reputation: 6488
We have seen this on our build system as well. The problem seems to be that the flutter scripts can't figure out what kind of build you are running. So to set the FLUTTER_BUILD_MODE
environment variable to Release
fixed it.
Valid values are Debug
, Profile
, or Release
Guide for setting enviroment variables for Xcode. (Or via scripts.)
Upvotes: 1