Here are some of the more useful tokens in Xcode:
- BUILD_DIR: The location of the build directory. This is normally somewhere deep in the derived data folder, but can be configured in Xcode.
/some/project/path/build/build
- BUILD_ROOT: This doesn't seem to be mentioned anywhere in Apple's documentation(just like lots of flags here), but seems to be set to the same thing as BUILD_DIR.
/some/project/path/build/build
- BUILT_PRODUCTS_DIR: The location where the final products are placed after building.
/some/project/path/build/build/Debug-iphoneos
- COMPRESS_PNG_FILES: A boolean value which specifies whether to compress PNG files whenthey are copied into the application bundle on iOS.
YES
- CONFIGURATION: The current build configuration. This is usually Debug or Release,but can be a custom configuration.
Debug
- CONFIGURATION_BUILD_DIR: The build directory for the current configuration. This seems togenerally be the same as the BUILD_PRODUCTS_DIR.
/some/project/path/build/build/Debug-iphoneos
- CURRENT_ARCH: Identifies the architecture on which the build is being *performed*.
i386
- DEBUGGING_SYMBOLS: A boolean which specifies if debug symbols should be included in thecurrent build.
YES
- DEVELOPMENT_LANGUAGE: Specifies the language that the project was developed in. Note thatthis means English/Spanish/etc. and *not* Objective-C/C++/etc.
English
- EFFECTIVE_PLATFORM_NAME: The platform which the build is being performed for, prefixed with a- usually. This can be combined with CONFIGURATION to get builddirectories usually.
-iphoneos
- INSTALL_OWNER: The user who owns the final built product. This can be used to getappropriate permissions, etc.
SomeUser
- IPHONEOS_DEPLOYMENT_TARGET: This one is simply the iOS deployment target. If you are developingfor iOS 7.0 then set it to 7.0.
7.0
- ONLY_ACTIVE_ARCH: A boolean flag which states if the build will be performed for theactive architecture only.
YES
- OPTIMIZATION_LEVEL: The optimisation level which is used by GCC compatible compilers.
0
- PATH: The PATH variable which is the same as you would see in a regularBash environment.
"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/usr/local/bin:/usr/bin:/bin:/usr/sbin"
- PLATFORM_NAME: The name of the current platform. This time there is no - unlike theEFFECTIVE_PLATFORM_NAME.
iphoneos
- PRODUCT_NAME: The current products name. This is usually the same name as the currentbuild target.
"Universal Build"
- PROJECT: The name of the project.
SuperAwesomeProject
- PROJECT_DIR: The location of the .xcodeproj directory.
/some/project/path/
- PROJECT_FILE_PATH: Similar to PROJECT_DIR, but this one places the .xcodeproj directoryon the end.
/some/project/path/build/Redstone_Common.xcodeproj
- PROJECT_NAME: Seems to be identical to PROJECT.
SuperAwesomeProject
- SDK_NAME: The current SDK being used.
iphoneos7.1
- SOURCE_ROOT: The location of the source code for this project.
/some/project/path
- SRCROOT: An alias for SOURCE_ROOT
/some/project/path
- TARGETNAME: The name of the current target.
"Universal Build"
- TARGET_BUILD_DIR: The build directory of the current target.
/some/project/path/build/build/Debug-iphoneos
- TARGET_NAME: An alias for TARGETNAME.
"Universal Build"
- USER: The current system user.
SomeUser
No comments:
Post a Comment