Skip to content

ENVFILE=.env.xxx has no effect on iOS unless also touching BuildDotenvConfig.rb #698

@smallsaucepan

Description

@smallsaucepan

Using react-native-config from the command line with the ENVFILE=.env.xxx syntax doesn't change the config available in the app. The workaround listed in #692 fixes the problem, though that issue suggests the workaround hasn't always been required.

Haven't done any setup in Xcode with schemes or anything. Just trying it out via the command line. From looking at the documentation this should work, so raising an issue.

Example commands used (Mac shell):

ENVFILE=.env.xxx npx react-native run-ios
(wrong config in app)
touch node_modules/react-native-config/ios/ReactNativeConfig/BuildDotenvConfig.rb
ENVFILE=.env.xxx npx react-native run-ios
(correct config in app)

Notable versions in the environment are:

react-native 0.69.5
react-native-config 1.4.11

Happy to provide any other details if useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions