ios – The right way to set –dart-define in Xcode


I am not in a position to construct and launch the app from xcode alone. Which means urgent the button “Begin the energetic scheme”.

I’ve tried setting the Consumer-Outlined setting DART_DEFINES beneath Construct Settings for the completely different schemes accordingly. E.g.:

DART_DEFINES
  Debug-at     ENV=at
  Debug-dev    ENV=dev

and so forth. Image for readability:

When making an attempt this, the construct fails with the next error:

error construct: Command PhaseScriptExecution failed with a nonzero exit
code

Am I lacking one thing apparent? Are there different methods of passing command line arguments when constructing/launching from xcode?

Launching the appliance on an IOS simulator from VSCode utilizing the next works positive:

{
    "title": "[dev] myAppName",
    "request": "launch",
    "sort": "dart",
    "args": [
        "--dart-define", "ENV=dev",
        "--flavor", "dev"
    ]
}

Working the next command works positive:

flutter construct ipa --flavor dev --dart-define "ENV=dev"