Use case
In an iOS app with no flavors, there are three default build configurations in the Xcode project: Debug, Profile and Release. When one wants to add flavors to an iOS app, they need to create a scheme for each of the flavors, but also new build configurations that follow a convention like: Buildmode-Flavor (Debug-apple, Release-banana etc). This means that for each flavor three new build configurations are created.
The Flutter tool then validates if the Xcode project has the required build configuration and passes it to the xcodebuild command. If the corresponding build configuration does not exist, the build fails, even though there is enough information in the scheme itself to not require to pass the configuration manually.
We have an app that has multiple flavors that each have a separate iOS target. The schemes allow us to select which target and which build configurations to use, so Xcode can select the correct build configuration depending on the flavor provided in the run/build command. We do not need multiple build configurations, since we are using targets to customise the flavors (icon, name, bundle id etc), but the Flutter tool forces us to have the configurations for each combination of build mode and flavor. This quickly builds up and pollutes the Xcode project.
Proposal
Allow the build even if Xcode project does not contain a build configuration corresponding to current build mode and flavor. The scheme is always selected that corresponds to the flavor and already contains the required information to select the correct build configuration.
I would be happy to contribute the changes myself, but I am not yet sure if I have not missed some cases where this might break things.
Use case
In an iOS app with no flavors, there are three default build configurations in the Xcode project: Debug, Profile and Release. When one wants to add flavors to an iOS app, they need to create a scheme for each of the flavors, but also new build configurations that follow a convention like: Buildmode-Flavor (Debug-apple, Release-banana etc). This means that for each flavor three new build configurations are created.
The Flutter tool then validates if the Xcode project has the required build configuration and passes it to the xcodebuild command. If the corresponding build configuration does not exist, the build fails, even though there is enough information in the scheme itself to not require to pass the configuration manually.
We have an app that has multiple flavors that each have a separate iOS target. The schemes allow us to select which target and which build configurations to use, so Xcode can select the correct build configuration depending on the flavor provided in the
run/buildcommand. We do not need multiple build configurations, since we are using targets to customise the flavors (icon, name, bundle id etc), but the Flutter tool forces us to have the configurations for each combination of build mode and flavor. This quickly builds up and pollutes the Xcode project.Proposal
Allow the build even if Xcode project does not contain a build configuration corresponding to current build mode and flavor. The scheme is always selected that corresponds to the flavor and already contains the required information to select the correct build configuration.
I would be happy to contribute the changes myself, but I am not yet sure if I have not missed some cases where this might break things.