lugg / react-native-config

Bring some 12 factor love to your mobile apps!
MIT License
4.76k stars 652 forks source link

Configuration not updating on updating new key in env #759

Open abhishek-mittal opened 1 year ago

abhishek-mittal commented 1 year ago

HI,

I have been trying to update my environment file but it's not reflecting while I'm creating my APPs build for android and ios.

Example:

my old .env KEY_1="some_value" KEY_2="some_more_value"

my new .env KEY_3="some_new_value"

now KEY_3 is not identified by my builds. Please help

ronilitman commented 12 months ago

Waiting for an answer too. Meanwhile, doing pod deintegrate && pod install and re running the project will work.

pmusaraj commented 11 months ago

I'm having the same issue, my temporary fix is to add a prep lane to Fastlane with the following cache clearing command:

File.write(File.expand_path("../node_modules/react-native-config/ios/ReactNativeConfig/GeneratedDotEnv.m"), "#define DOT_ENV @{  };")
huanglong6828 commented 11 months ago

692

Also you need to select an option in “Provide build settings from” in order to get env variable