Skip to content

Instantly share code, notes, and snippets.

@marciok
Created March 5, 2015 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marciok/4b9df48d0173191b7e38 to your computer and use it in GitHub Desktop.
Save marciok/4b9df48d0173191b7e38 to your computer and use it in GitHub Desktop.
Adding an environment variable before building your app
# 1. Add an enviroment variable on your bundle identifier on Xcode for example:
# com.yourAppName.$(PRODUCT_NAME:rfc1034identifier).${MY_ENV_VARIBLE}.
# 2. You should have a custom build script to execute on travis, so your .travis.yml look like this:
# ....
# script:
# - ./your-custom-build-script.sh
# ....
# 3. Set a value to this variable before your build with travis:
export MY_ENV_VARIBLE="customName"
xctool -workspace ${APP_NAME}.xcworkspace -scheme ${APP_NAME} # etc...
# Profit ! :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment