Build Settings and Scriptability
Build Settings and Scriptability
- Subject: Build Settings and Scriptability
- From: Jerry Krinock <email@hidden>
- Date: Wed, 17 Oct 2012 23:27:19 -0700
As the last step in my shipping script, I like to bump my project's version. This was do-able in Xcode 3, by using AppleScript to set the CURRENT_PROJECT_VERSION (Current Project Version) Build Setting of the project, which propagated to the Targets, which propagated to Info.plist via Info.plist Preprocessing during the next build.
But I cannot change CURRENT_PROJECT_VERSION via script in Xcode 4. I could paste in here several AppleScripts that should work, but don't, each because of a different broken behavior in Xcode 4's AppleScriptability or incorrect scripting dictionary entry. But they're pretty boring, and I think that anyone who has spent more than a few minutes trying to AppleScript Xcode 4 will take my word for this as par for the course.
Upon studying this further, I got more questions than answers.
• In the current Xcode Build Settings Reference [1], I counted 168 ± 2 Build Settings listed in 12 categories, and CURRENT_PROJECT_VERSION is not among them.
• When I create a new project in Xcode 4.5, there seems to be well over 200 Build Settings, in 22 categories. And only 2 of these 22 categories seem to correspond to any of the 12 listed in the Build Settings Reference. There is a category called "Versioning", which is absent from the Build Settings Reference, which contains CURRENT_PROJECT_VERSION.
• When I ask AppleScript for all of the Build Settings in a target, I get a number from 10 to 20, for different targets, drawn from a list of 45 [2], which does not include CURRENT_PROJECT_VERSION.
I know that thinking outside the box is asking for *some* trouble, but the disparities here seem too gross to have been accidental. Am I just asking all of the wrong questions, or am I from another planet?
Jerry
[1] http://developer.apple.com/library/mac/#documentation/developertools/Reference/XcodeBuildSettingRef/0-Introduction/introduction.html
[2]
ALWAYS_SEARCH_USER_PATHS
ARCHS
BUNDLE_LOADER
COMBINE_HIDPI_IMAGES
COPY_PHASE_STRIP
DEAD_CODE_STRIPPING
DEBUG_INFORMATION_FORMAT
DEPLOYMENT_LOCATION
DEPLOYMENT_POSTPROCESSING
DYLIB_COMPATIBILITY_VERSION
DYLIB_CURRENT_VERSION
EXPORTED_SYMBOLS_FILE
FRAMEWORK_SEARCH_PATHS
FRAMEWORK_VERSION
GCC_C_LANGUAGE_STANDARD
GCC_DYNAMIC_NO_PIC
GCC_ENABLE_OBJC_EXCEPTIONS
GCC_MODEL_TUNING
GCC_OPTIMIZATION_LEVEL
GCC_PRECOMPILE_PREFIX_HEADER
GCC_PREFIX_HEADER
GCC_PREPROCESSOR_DEFINITIONS
GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS
GCC_SYMBOLS_PRIVATE_EXTERN
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF
HEADER_SEARCH_PATHS
INFOPLIST_FILE
INFOPLIST_OTHER_PREPROCESSOR_FLAGS
INFOPLIST_PREPROCESS
INSTALL_PATH
LD_GENERATE_MAP_FILE
LIBRARY_SEARCH_PATHS
MINIMUM_SYSTEM_VERSION
ONLY_ACTIVE_ARCH
OTHER_CFLAGS
OTHER_CPLUSPLUSFLAGS
OTHER_LDFLAGS
PRODUCT_NAME
PRODUCT_NAME_LOWER
SDKROOT
TEST_HOST
USER_HEADER_SEARCH_PATHS
WARNING_CFLAGS
WRAPPER_EXTENSION
ZERO_LINK
P.S. I thought that ZERO_LINK was given the heave-ho about five years ago?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden