Skip to content

Instantly share code, notes, and snippets.

@drunknbass
Created December 3, 2013 19:02
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 drunknbass/7775421 to your computer and use it in GitHub Desktop.
Save drunknbass/7775421 to your computer and use it in GitHub Desktop.
Pass list to Xcode via command line build (IPA)
# Usage:
# cd to dir with xcode.pbxproj and execute.
ARCHIVE_PATH='output.ipa'
BAR='\"B:A:R\"'
xcodebuild -scheme "My Scheme" -configuration "Enterprise" GCC_PREPROCESSOR_DEFINITIONS='FOO='$BAR'' archive -archivePath $ARCHIVE_PATH || { echo Enterprise BUILD failed"; exit 1; }
----------------------
in prefix.pch capture and define array as follows
#ifndef FOO
#define FOOBARRED @[]
#define FOO "UNDEFINED"
#else
#define FOOBARRED [[NSString stringWithUTF8String:FOO] componentsSeparatedByString:@":"]
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment