You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow users to pass in Xcode build settings as env variables to "flutter build ios-framework" FLUTTER_XCODE_ #49378
This was done for all other commands via env variables with the FLUTTER_XCODE_ prefix (like FLUTTER_XCODE_CODE_SIGN_STYLE) with #43553 but was missed when creating build ios-framework command.
it kinda works. But you can't pass the arguments which start with minus. I.e. you can pass -derivedDataPath via FLUTTER_XCODE. Because FLUTTER_XCODE_-derivedDataPath variable cannot be created.
it kinda works. But you can't pass the arguments which start with minus. I.e. you can pass -derivedDataPath via FLUTTER_XCODE. Because FLUTTER_XCODE_-derivedDataPath variable cannot be created.
it kinda works. But you can't pass the arguments which start with minus. I.e. you can pass -derivedDataPath via FLUTTER_XCODE. Because FLUTTER_XCODE_-derivedDataPath variable cannot be created.
Wouldn't it be simplier to have one environment variable (for example FLUTTER_XCODE) which will contain the string, which is just concatenated to the command line? So that any sophisticated combination of compilation flags could be added.
@bhavyalatha26FLUTTER_XCODE_* (like FLUTTER_XCODE_ARCHS) #43553 for flutter build ios and flutter run is in v1.10.15, so yes, stable. This issue is tracking that that mechanism doesn't work for flutter build ios-framework on any channel.
FLUTTER_XCODE=<arbitrary injection of variables> as @AntonKukoba1 suggested isn't implemented anywhere.
@bhavyalatha26FLUTTER_XCODE_ isn't for setting environment variables, it's a build setting that gets passed to xcodebuild. Can you file a new issue requesting improved documentation, or ask on SO? This GitHub issue is tracking a specific bug related to the flutter build ios-framework command
Activity
jmagman commentedon Jan 29, 2020
It does already pass the environment variables to invocations of
xcodebuildEXCEPT when building plugins.AntonKukoba1 commentedon Feb 17, 2020
it kinda works. But you can't pass the arguments which start with minus. I.e. you can pass -derivedDataPath via FLUTTER_XCODE. Because FLUTTER_XCODE_-derivedDataPath variable cannot be created.
jmagman commentedon Feb 18, 2020
You can probably play with build settings like
SYMROOTandMODULE_CACHE_DIRto get the behavior you want.https://help.apple.com/xcode/mac/11.4/#/itcaec37c2a6
AntonKukoba1 commentedon Mar 2, 2020
Wouldn't it be simplier to have one environment variable (for example FLUTTER_XCODE) which will contain the string, which is just concatenated to the command line? So that any sophisticated combination of compilation flags could be added.
bhavyalatha26 commentedon Jul 12, 2020
Hi @jmagman,
Is FLUTTER_XCODE prefix support available on stable channel ?
jmagman commentedon Jul 13, 2020
@bhavyalatha26
FLUTTER_XCODE_*(likeFLUTTER_XCODE_ARCHS) #43553 forflutter build iosandflutter runis in v1.10.15, so yes, stable. This issue is tracking that that mechanism doesn't work forflutter build ios-frameworkon any channel.FLUTTER_XCODE=<arbitrary injection of variables>as @AntonKukoba1 suggested isn't implemented anywhere.bhavyalatha26 commentedon Jul 14, 2020
Thanks for the info @jmagman.
I just need one more info as of how to pass these variables.
For instance I added google maps package to my app and I am trying to pass the google maps key as XCODE env var to the AppDelegat.swift class as below
Flutter : stable 1.17.5
XCode : 11.5
I tried it in below 3 ways. But none of them worked.
1.
2.
3.
Can you help me the right way of doing this
jmagman commentedon Jul 14, 2020
@bhavyalatha26
FLUTTER_XCODE_isn't for setting environment variables, it's a build setting that gets passed toxcodebuild. Can you file a new issue requesting improved documentation, or ask on SO? This GitHub issue is tracking a specific bug related to theflutter build ios-frameworkcommandbhavyalatha26 commentedon Jul 15, 2020
Ok thank you @jmagman