A little tool to set Xcode build settings from the command line.
You can specify the target and the configuration to set. If you don't specify a target, the setting is changed in the project. If you don't specify a configuration, the setting will be applied to all configurations.
Therefore when you specify a target and a configuration only the setting in that target for that configuration is affected.
Fork | Build Status | Master Version |
---|---|---|
Mulle kybernetiK |
Use the homebrew package manager to install it, or build it yourself with Xcode:
brew install mulle-kybernetik/software/mulle-xcode-settings
usage: mulle-xcode-settings [options] <commands> <file.xcodeproj>
Options:
-c <configuration> : configuration to set
-t <target> : target to set
-a : set on all targets
Commands:
list : list all keys
get <key> : get value for key
set <key> <value> : sets key to value
add <key> <value> : adds value to key
insert <key> <value> : inserts value in front of key
remove <key> <value> : removes value from key
replace <key> <old> <value> : replace old value for key (if exists)
Environment:
VERBOSE : dump some info to stderr
List all current non-default project settings:
$ mulle-xcode-settings list mulle-xcode-settings.xcodeproj
Targets:
mulle-xcode-settings
mullepbx
Project:
Debug:
CLANG_WARN_DIRECT_OBJC_ISA_USAGE="NO"
CURRENT_PROJECT_VERSION="1.1.0"
DEBUG_INFORMATION_FORMAT="dwarf"
DYLIB_COMPATIBILITY_VERSION="$(CURRENT_PROJECT_VERSION)"
DYLIB_CURRENT_VERSION="1.0.0"
GCC_OPTIMIZATION_LEVEL="0"
MACOSX_DEPLOYMENT_TARGET="10.4"
OTHER_CFLAGS="-DCURRENT_PROJECT_VERSION=\"${CURRENT_PROJECT_VERSION}\""
Release:
CLANG_WARN_DIRECT_OBJC_ISA_USAGE="NO"
CURRENT_PROJECT_VERSION="1.1.0"
DEBUG_INFORMATION_FORMAT="dwarf"
DYLIB_COMPATIBILITY_VERSION="$(CURRENT_PROJECT_VERSION)"
DYLIB_CURRENT_VERSION="1.0.0"
GCC_GENERATE_DEBUGGING_SYMBOLS="NO"
MACOSX_DEPLOYMENT_TARGET="10.4"
OTHER_CFLAGS="-DCURRENT_PROJECT_VERSION=\"${CURRENT_PROJECT_VERSION}\""
List all non-default settings for target mullepbx
:
$ mulle-xcode-settings -t mullepbx list mulle-xcode-settings.xcodeproj
mullepbx:
Debug:
EXECUTABLE_PREFIX="lib"
PRODUCT_NAME="$(TARGET_NAME)"
Release:
EXECUTABLE_PREFIX="lib"
PRODUCT_NAME="$(TARGET_NAME)"
Change a setting in target mullepbx
for configuration Debug
:
$ mulle-xcode-settings -t mullepbx -c Debug set PRODUCT_NAME 'My Foo' mulle-xcode-settings.xcodeproj
Add a setting to the project combining it with the previous setting. Then remove change again, reverting settings to their former state:
$ mulle-xcode-settings add HEADER_SEARCH_PATHS '/usr/local/include' ./X.xcodeproj
$ mulle-xcode-settings remove HEADER_SEARCH_PATHS '/usr/local/include' ./X.xcodeproj
This is basically a stripped down version of mulle_xcode_utility
.
- Avoid superflous writes to file
- Improve usage output a bit
- Use original object version for written pbxproj. This fixes an escaping bug.
- Had to say good bye to isa
- Added list command, which makes
mulle-xcode-settings
easier to use.
- Changed option handling to - and -- (but keep old flags for compatibility.
- Added -alltargets
- Added -help
- Adding a string to another string, creates a proper array of strings. (If the string isn't a duplicate). New command "insert" like add, but adds in front of previous value(s).
- Fix moar compile problems that turned up in brew (why not earlier ?)
- Fix some compile problems that turned up in brew (why not earlier ?)
- Fixed a crasher due to multi-value settings
Coded by Nat!