When integrating into the existing Xcode project a script will need to be added to the scheme's Pre-Action to swap the FlutterPluginRegistrant/Sources and FlutterPluginRegistrant/Package.swift symlink to the appropriate build mode.
Another script will be added as a Build Phase (after embedding), which will validate that the correct artifacts are embedded for the targeted build configuration as a safeguard. It will also run flutter assemble if FLUTTER_APPLICATION_PATH is set. This will re-build the App.framework with any Dart code changes.
In addition, we will also provide a swift package plugin (FlutterConfigurationPlugin), which will allow the developer to manually switch the build mode via Xcode's GUI.

When integrating into the existing Xcode project a script will need to be added to the scheme's Pre-Action to swap the
FlutterPluginRegistrant/SourcesandFlutterPluginRegistrant/Package.swiftsymlink to the appropriate build mode.Another script will be added as a Build Phase (after embedding), which will validate that the correct artifacts are embedded for the targeted build configuration as a safeguard. It will also run
flutter assembleifFLUTTER_APPLICATION_PATHis set. This will re-build the App.framework with any Dart code changes.In addition, we will also provide a swift package plugin (
FlutterConfigurationPlugin), which will allow the developer to manually switch the build mode via Xcode's GUI.