Chris Ball
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:

    Chris Ball

    Managing Partner @ Echobind

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade