Sep 5, 2018 · 1 min read
Rein Van Imschoot create an appcenter-pre-build.sh file in the root of your repo and call the Fastlane lane:
#!/usr/bin/env bash# Creates an .env from ENV variables for use with react-native-config
ENV_WHITELIST=${ENV_WHITELIST:-"^RN"}
printf "Creating an .env file with the following whitelist:\n"
printf "%s\n\n" $ENV_WHITELIST
set | egrep -e $ENV_WHITELIST | egrep -v "^_" | egrep -v "WHITELIST" > .env
printf "\n.env created with contents:\n"
cat .env# Run a fastlane lane to change app id, display name, icon, etc
bundle install
bundle exec fastlane prep_release_type
If you’re using the scripts I referenced in the article, you’ll just need to set the env variables in App Center’s build settings to the desired value:

