react-nativefastlanereact-native-config

Using react-native-config with fastlane


currently in my react-native app I configure two lanes using fastlane: beta and production. I'm using react-native-config for different environment configs (stored in 2 files: .env.beta and .env.production). How can I let fastlane know which env file should be used for each lane ?


Solution

  • I managed to get react-native-config to pick up the correct config file using the environment variables feature provided by fastlane by using fastlane [lane] --env [beta|production].