Saturday, September 24, 2022
HomeiOS Developmentios - Find out how to set --dart-define in Xcode

ios – Find out how to set –dart-define in Xcode


I am not capable of construct and launch the app from xcode alone. That means urgent the button “Begin the energetic scheme”.

I’ve tried setting the Person-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:

enter image description here

When attempting 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 high-quality:

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

Operating the next command works high-quality:

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

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments