如何在 Xcode 项目中打印“构建设置”列表?
Posted
技术标签:
【中文标题】如何在 Xcode 项目中打印“构建设置”列表?【英文标题】:How do I print a list of "Build Settings" in Xcode project? 【发布时间】:2011-10-18 03:53:23 【问题描述】:备用标题
Xcode 构建变量列表 打印 Xcode 构建设置列表 Clang 环境变量 Xcode 环境变量的规范列表是否有可用于构建规则等的Xcode 环境变量规范列表?
【问题讨论】:
【参考方案1】:更新:这个列表有点过时了(它是用 Xcode 4.1 生成的)。您应该通过dunedin15 运行命令suggested。
dunedin15 的回答可能会在某些极端情况下给出不准确的结果,例如在为存档构建调试静态库的构建设置时,请参阅Slipp D. Thompson's answer 以获得更强大的输出。
原答案
Variable Example
PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
LANG en_US.US-ASCII
IPHONEOS_DEPLOYMENT_TARGET 4.1
ACTION build
AD_HOC_CODE_SIGNING_ALLOWED NO
ALTERNATE_GROUP staff
ALTERNATE_MODE u+w,go-w,a+rX
ALTERNATE_OWNER username
ALWAYS_SEARCH_USER_PATHS YES
APPLE_INTERNAL_DEVELOPER_DIR /AppleInternal/Developer
APPLE_INTERNAL_DIR /AppleInternal
APPLE_INTERNAL_DOCUMENTATION_DIR /AppleInternal/Documentation
APPLE_INTERNAL_LIBRARY_DIR /AppleInternal/Library
APPLE_INTERNAL_TOOLS /AppleInternal/Developer/Tools
APPLY_RULES_IN_COPY_FILES NO
ARCHS "armv6 armv7"
ARCHS_STANDARD_32_64_BIT "armv6 armv7"
ARCHS_STANDARD_32_BIT "armv6 armv7"
ARCHS_UNIVERSAL_IPHONE_OS armv7
AVAILABLE_PLATFORMS "iphonesimulator macosx iphoneos"
BUILD_COMPONENTS "headers build"
BUILD_DIR "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/BuildProductsPath"
BUILD_ROOT "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/BuildProductsPath"
BUILD_STYLE
BUILD_VARIANTS normal
BUILT_PRODUCTS_DIR "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/BuildProductsPath/Distribution-iphoneos"
CACHE_ROOT /var/folders/2x/rvb2r9s16mq6r318zxvn0lk80000gn/C/com.apple.Xcode.501
CCHROOT /var/folders/2x/rvb2r9s16mq6r318zxvn0lk80000gn/C/com.apple.Xcode.501
CHMOD /bin/chmod
CHOWN /usr/sbin/chown
CLASS_FILE_DIR "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build/Distribution-iphoneos/Project.build/JavaClasses"
CLEAN_PRECOMPS YES
CLONE_HEADERS NO
CODESIGNING_FOLDER_PATH "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/InstallationBuildProductsLocation/Applications/project.app"
CODE_SIGNING_ALLOWED YES
CODE_SIGNING_REQUIRED YES
CODE_SIGN_CONTEXT_CLASS XCiPhoneOSCodeSignContext
CODE_SIGN_IDENTITY "iPhone Distribution"
COMBINE_HIDPI_IMAGES NO
COMPOSITE_SDK_DIRS /var/folders/2x/rvb2r9s16mq6r318zxvn0lk80000gn/C/com.apple.Xcode.501/CompositeSDKs
COMPRESS_PNG_FILES YES
CONFIGURATION Distribution
CONFIGURATION_BUILD_DIR "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/BuildProductsPath/Distribution-iphoneos"
CONFIGURATION_TEMP_DIR "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build/Distribution-iphoneos"
CONTENTS_FOLDER_PATH project.app/Contents
COPYING_PRESERVES_HFS_DATA NO
COPY_PHASE_STRIP YES
COPY_RESOURCES_FROM_STATIC_FRAMEWORKS YES
CP /bin/cp
CURRENT_ARCH armv7
CURRENT_VARIANT normal
DEAD_CODE_STRIPPING YES
DEBUGGING_SYMBOLS YES
DEBUG_INFORMATION_FORMAT dwarf-with-dsym
DEPLOYMENT_LOCATION YES
DEPLOYMENT_POSTPROCESSING YES
DERIVED_FILES_DIR "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build/Distribution-iphoneos/Project.build/DerivedSources"
DERIVED_FILE_DIR "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build/Distribution-iphoneos/Project.build/DerivedSources"
DERIVED_SOURCES_DIR "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build/Distribution-iphoneos/Project.build/DerivedSources"
DEVELOPER_APPLICATIONS_DIR /Developer/Applications
DEVELOPER_BIN_DIR /Developer/usr/bin
DEVELOPER_DIR /Developer
DEVELOPER_FRAMEWORKS_DIR /Developer/Library/Frameworks
DEVELOPER_FRAMEWORKS_DIR_QUOTED "\"/Developer/Library/Frameworks\""
DEVELOPER_LIBRARY_DIR /Developer/Library
DEVELOPER_SDK_DIR /Developer/SDKs
DEVELOPER_TOOLS_DIR /Developer/Tools
DEVELOPER_USR_DIR /Developer/usr
DEVELOPMENT_LANGUAGE English
DOCUMENTATION_FOLDER_PATH project.app/English.lproj/Documentation
DO_HEADER_SCANNING_IN_JAM NO
DSTROOT "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/InstallationBuildProductsLocation"
DWARF_DSYM_FILE_NAME project.app.dSYM
DWARF_DSYM_FILE_SHOULD_ACCOMPANY_PRODUCT NO
DWARF_DSYM_FOLDER_PATH "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/BuildProductsPath/Distribution-iphoneos"
EFFECTIVE_PLATFORM_NAME -iphoneos
EMBEDDED_PROFILE_NAME embedded.mobileprovision
ENABLE_HEADER_DEPENDENCIES YES
ENABLE_OPENMP_SUPPORT NO
ENTITLEMENTS_ALLOWED YES
ENTITLEMENTS_REQUIRED YES
EXCLUDED_INSTALLSRC_SUBDIRECTORY_PATTERNS ".svn CVS"
EXECUTABLES_FOLDER_PATH project.app/Executables
EXECUTABLE_FOLDER_PATH project.app
EXECUTABLE_NAME project
EXECUTABLE_PATH project.app/project
FILE_LIST "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build/Distribution-iphoneos/Project.build/Objects/LinkFileList"
FIXED_FILES_DIR "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build/Distribution-iphoneos/Project.build/FixedFiles"
FRAMEWORKS_FOLDER_PATH project.app/Frameworks
FRAMEWORK_FLAG_PREFIX -framework
FRAMEWORK_SEARCH_PATHS "\"/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/BuildProductsPath/Distribution-iphoneos\" "
FRAMEWORK_VERSION A
FULL_PRODUCT_NAME project.app
GCC3_VERSION 3.3
GCC_C_LANGUAGE_STANDARD gnu99
GCC_INLINES_ARE_PRIVATE_EXTERN YES
GCC_PFE_FILE_C_DIALECTS "c objective-c c++ objective-c++"
GCC_PRECOMPILE_PREFIX_HEADER YES
GCC_PREFIX_HEADER project/Prefix.pch
GCC_PREPROCESSOR_DEFINITIONS "NDEBUG DISTRIBUTION_BUILD=1 KK_TARGET=0x000F0"
GCC_SYMBOLS_PRIVATE_EXTERN YES
GCC_THUMB_SUPPORT YES
GCC_TREAT_WARNINGS_AS_ERRORS NO
GCC_VERSION com.apple.compilers.llvm.clang.1_0
GCC_VERSION_IDENTIFIER com_apple_compilers_llvm_clang_1_0
GCC_WARN_ABOUT_RETURN_TYPE YES
GCC_WARN_UNUSED_FUNCTION YES
GCC_WARN_UNUSED_VARIABLE YES
GENERATE_MASTER_OBJECT_FILE NO
GENERATE_PKGINFO_FILE YES
GENERATE_PROFILING_CODE NO
GID 20
GROUP staff
INPUT_FILE_BASE Default
INPUT_FILE_DIR "/Volumes/Development/Project Game/Project-v1/images"
INPUT_FILE_NAME Default.png
INPUT_FILE_PATH "/Volumes/Development/Project Game/Project-v1/images/Default.png"
SCRIPT_INPUT_FILE "/Volumes/Development/Project Game/Project-v1/images/Default.png"
SCRIPT_OUTPUT_FILE_0 "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build/Distribution-iphoneos/Project.build/DerivedSources/Default.png"
EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES "*.nib *.lproj *.framework *.gch (*) CVS .svn .git *.xcodeproj *.xcode *.pbproj *.pbxproj"
HEADERMAP_INCLUDES_FLAT_ENTRIES_FOR_TARGET_BEING_BUILT YES
HEADERMAP_INCLUDES_FRAMEWORK_ENTRIES_FOR_ALL_PRODUCT_TYPES YES
HEADERMAP_INCLUDES_NONPUBLIC_NONPRIVATE_HEADERS YES
HEADERMAP_INCLUDES_PROJECT_HEADERS YES
HEADER_SEARCH_PATHS "\"/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/BuildProductsPath/Distribution-iphoneos/include\" "
ICONV /usr/bin/iconv
INFOPLIST_EXPAND_BUILD_SETTINGS YES
INFOPLIST_FILE project/Resources/Info.plist
INFOPLIST_OUTPUT_FORMAT binary
INFOPLIST_PATH project.app/Info.plist
INFOPLIST_PREPROCESS NO
INFOSTRINGS_PATH project.app/English.lproj/InfoPlist.strings
INPUT_FILE_REGION_PATH_COMPONENT
INPUT_FILE_SUFFIX .png
INSTALL_DIR "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/InstallationBuildProductsLocation/Applications"
INSTALL_GROUP staff
INSTALL_MODE_FLAG u+w,go-w,a+rX
INSTALL_OWNER username
INSTALL_PATH /Applications
INSTALL_ROOT "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/InstallationBuildProductsLocation"
JAVAC_DEFAULT_FLAGS "-J-Xms64m -J-XX:NewSize=4M -J-Dfile.encoding=UTF8"
JAVA_APP_STUB /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub
JAVA_ARCHIVE_CLASSES YES
JAVA_ARCHIVE_TYPE JAR
JAVA_COMPILER /usr/bin/javac
JAVA_FOLDER_PATH project.app/Java
JAVA_FRAMEWORK_RESOURCES_DIRS Resources
JAVA_JAR_FLAGS cv
JAVA_SOURCE_SUBDIR .
JAVA_USE_DEPENDENCIES YES
JAVA_ZIP_FLAGS -urg
JIKES_DEFAULT_FLAGS "+E +OLDCSO"
KEEP_PRIVATE_EXTERNS NO
LD_GENERATE_MAP_FILE NO
LD_MAP_FILE_PATH "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build/Distribution-iphoneos/Project.build/project-LinkMap-normal-armv7.txt"
LD_NO_PIE NO
LD_OPENMP_FLAGS -fopenmp
LEGACY_DEVELOPER_DIR /Developer/Library/Xcode/PrivatePlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer
LEX /Developer/usr/bin/lex
LIBRARY_FLAG_NOSPACE YES
LIBRARY_FLAG_PREFIX -l
LIBRARY_SEARCH_PATHS "\"/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/BuildProductsPath/Distribution-iphoneos\" \"/Volumes/Development/Project Game/Project-v1/FlurryLib\""
LINKER_DISPLAYS_MANGLED_NAMES NO
LINK_FILE_LIST_normal_armv6 "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build/Distribution-iphoneos/Project.build/Objects-normal/armv6/project.LinkFileList"
LINK_FILE_LIST_normal_armv7 "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build/Distribution-iphoneos/Project.build/Objects-normal/armv7/project.LinkFileList"
LINK_WITH_STANDARD_LIBRARIES YES
LOCALIZED_RESOURCES_FOLDER_PATH project.app/English.lproj
LOCAL_ADMIN_APPS_DIR /Applications/Utilities
LOCAL_APPS_DIR /Applications
LOCAL_DEVELOPER_DIR /Library/Developer
LOCAL_LIBRARY_DIR /Library
MACH_O_TYPE mh_execute
MAC_OS_X_PRODUCT_BUILD_VERSION 11A511
MAC_OS_X_VERSION_ACTUAL 1070
MAC_OS_X_VERSION_MAJOR 1070
MAC_OS_X_VERSION_MINOR 0700
NATIVE_ARCH armv6
NATIVE_ARCH_32_BIT i386
NATIVE_ARCH_64_BIT x86_64
NATIVE_ARCH_ACTUAL x86_64
NO_COMMON YES
OBJECT_FILE_DIR "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build/Distribution-iphoneos/Project.build/Objects"
OBJECT_FILE_DIR_normal "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build/Distribution-iphoneos/Project.build/Objects-normal"
OBJROOT "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath"
ONLY_ACTIVE_ARCH NO
OPTIMIZATION_LEVEL 0
OS MACOS
OSAC /usr/bin/osacompile
OTHER_CFLAGS -DNS_BLOCK_ASSERTIONS=1
OTHER_CPLUSPLUSFLAGS -DNS_BLOCK_ASSERTIONS=1
OTHER_INPUT_FILE_FLAGS
OTHER_LDFLAGS -lz
PACKAGE_TYPE com.apple.package-type.wrapper.application
PASCAL_STRINGS YES
PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES "/usr/include /usr/local/include /System/Library/Frameworks /System/Library/PrivateFrameworks /Developer/Headers /Developer/SDKs /Developer/Platforms"
PBDEVELOPMENTPLIST_PATH project.app/pbdevelopment.plist
PFE_FILE_C_DIALECTS "c objective-c c++ objective-c++"
PKGINFO_FILE_PATH "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build/Distribution-iphoneos/Project.build/PkgInfo"
PKGINFO_PATH project.app/PkgInfo
PLATFORM_DEVELOPER_APPLICATIONS_DIR /Developer/Platforms/iPhoneOS.platform/Developer/Applications
PLATFORM_DEVELOPER_BIN_DIR /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
PLATFORM_DEVELOPER_LIBRARY_DIR /Developer/Library/Xcode/PrivatePlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library
PLATFORM_DEVELOPER_SDK_DIR /Developer/Platforms/iPhoneOS.platform/Developer/SDKs
PLATFORM_DEVELOPER_TOOLS_DIR /Developer/Platforms/iPhoneOS.platform/Developer/Tools
PLATFORM_DEVELOPER_USR_DIR /Developer/Platforms/iPhoneOS.platform/Developer/usr
PLATFORM_DIR /Developer/Platforms/iPhoneOS.platform
PLATFORM_NAME iphoneos
PLATFORM_PREFERRED_ARCH i386
PLATFORM_PRODUCT_BUILD_VERSION 8H7
PLIST_FILE_OUTPUT_FORMAT binary
PLUGINS_FOLDER_PATH project.app/PlugIns
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR YES
PRECOMP_DESTINATION_DIR "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build/Distribution-iphoneos/Project.build/PrefixHeaders"
PRESERVE_DEAD_CODE_INITS_AND_TERMS NO
PRIVATE_HEADERS_FOLDER_PATH project.app/PrivateHeaders
PRODUCT_NAME project
PRODUCT_SETTINGS_PATH "/Volumes/Development/Project Game/Project-v1/project/Resources/Info.plist"
PRODUCT_TYPE com.apple.product-type.application
PROFILING_CODE NO
PROJECT project
PROJECT_DERIVED_FILE_DIR "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build/DerivedSources"
PROJECT_DIR "/Volumes/Development/Project Game/Project-v1"
PROJECT_FILE_PATH "/Volumes/Development/Project Game/Project-v1/project.xcodeproj"
PROJECT_NAME project
PROJECT_TEMP_DIR "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build"
PROVISIONING_PROFILE_REQUIRED YES
PUBLIC_HEADERS_FOLDER_PATH project.app/Headers
RECURSIVE_SEARCH_PATHS_FOLLOW_SYMLINKS YES
REMOVE_CVS_FROM_RESOURCES YES
REMOVE_GIT_FROM_RESOURCES YES
REMOVE_SVN_FROM_RESOURCES YES
RESOURCE_RULES_REQUIRED YES
REZ_COLLECTOR_DIR "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build/Distribution-iphoneos/Project.build/ResourceManagerResources"
REZ_OBJECTS_DIR "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build/Distribution-iphoneos/Project.build/ResourceManagerResources/Objects"
REZ_SEARCH_PATHS "\"/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/BuildProductsPath/Distribution-iphoneos\" "
RUN_CLANG_STATIC_ANALYZER NO
SCAN_ALL_SOURCE_FILES_FOR_INCLUDES NO
SCRIPTS_FOLDER_PATH project.app/Scripts
SCRIPT_INPUT_FILE "/Volumes/Development/Project Game/Project-v1/fonts/helvetica-black-hd.png"
SCRIPT_OUTPUT_FILE_0 "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build/Distribution-iphoneos/Project.build/DerivedSources/helvetica-black-hd.png"
SCRIPT_OUTPUT_FILE_COUNT 1
SDKROOT /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk
SDK_DIR /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk
SDK_NAME iphoneos4.3
SDK_PRODUCT_BUILD_VERSION 8H7
SED /usr/bin/sed
SEPARATE_STRIP NO
SEPARATE_SYMBOL_EDIT NO
SET_DIR_MODE_OWNER_GROUP YES
SET_FILE_MODE_OWNER_GROUP NO
SHALLOW_BUNDLE YES
SHARED_DERIVED_FILE_DIR "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/BuildProductsPath/Distribution-iphoneos/DerivedSources"
SHARED_FRAMEWORKS_FOLDER_PATH project.app/SharedFrameworks
SHARED_PRECOMPS_DIR /Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/Build/PrecompiledHeaders
SHARED_SUPPORT_FOLDER_PATH project.app/SharedSupport
SKIP_INSTALL NO
SOURCE_ROOT "/Volumes/Development/Project Game/Project-v1"
SRCROOT "/Volumes/Development/Project Game/Project-v1"
STRINGS_FILE_OUTPUT_ENCODING binary
STRIP_INSTALLED_PRODUCT YES
STRIP_STYLE all
SUPPORTED_DEVICE_FAMILIES 1,2
SUPPORTED_PLATFORMS "iphonesimulator iphoneos"
SYMROOT "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/BuildProductsPath"
SYSTEM_ADMIN_APPS_DIR /Applications/Utilities
SYSTEM_APPS_DIR /Applications
SYSTEM_CORE_SERVICES_DIR /System/Library/CoreServices
SYSTEM_DEMOS_DIR /Applications/Extras
SYSTEM_DEVELOPER_APPS_DIR /Developer/Applications
SYSTEM_DEVELOPER_BIN_DIR /Developer/usr/bin
SYSTEM_DEVELOPER_DEMOS_DIR "/Developer/Applications/Utilities/Built Examples"
SYSTEM_DEVELOPER_DIR /Developer
SYSTEM_DEVELOPER_DOC_DIR "/Developer/ADC Reference Library"
SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR "/Developer/Applications/Graphics Tools"
SYSTEM_DEVELOPER_JAVA_TOOLS_DIR "/Developer/Applications/Java Tools"
SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR "/Developer/Applications/Performance Tools"
SYSTEM_DEVELOPER_RELEASENOTES_DIR "/Developer/ADC Reference Library/releasenotes"
SYSTEM_DEVELOPER_TOOLS /Developer/Tools
SYSTEM_DEVELOPER_TOOLS_DOC_DIR "/Developer/ADC Reference Library/documentation/DeveloperTools"
SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR "/Developer/ADC Reference Library/releasenotes/DeveloperTools"
SYSTEM_DEVELOPER_USR_DIR /Developer/usr
SYSTEM_DEVELOPER_UTILITIES_DIR /Developer/Applications/Utilities
SYSTEM_DOCUMENTATION_DIR /Library/Documentation
SYSTEM_LIBRARY_DIR /System/Library
TARGETED_DEVICE_FAMILY 1
TARGETNAME Project
TARGET_BUILD_DIR "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/InstallationBuildProductsLocation/Applications"
TARGET_NAME Project
TARGET_TEMP_DIR "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build/Distribution-iphoneos/Project.build"
TEMP_DIR "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build/Distribution-iphoneos/Project.build"
TEMP_FILES_DIR "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build/Distribution-iphoneos/Project.build"
TEMP_FILE_DIR "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath/project.build/Distribution-iphoneos/Project.build"
TEMP_ROOT "/Users/username/Library/Developer/Xcode/DerivedData/project-dxdgjvgsvvbhowgjqouevhmvgxgf/ArchiveIntermediates/Project Distribution/IntermediateBuildFilesPath"
TEST_AFTER_BUILD NO
UID 501
UNLOCALIZED_RESOURCES_FOLDER_PATH project.app UNSTRIPPED_PRODUCT NO
USER username
USER_APPS_DIR /Users/username/Applications
USER_HEADER_SEARCH_PATHS project/libs
USER_LIBRARY_DIR /Users/username/Library
USE_DYNAMIC_NO_PIC YES
USE_HEADERMAP YES
USE_HEADER_SYMLINKS NO
VALIDATE_PRODUCT YES
VALID_ARCHS "armv6 armv7"
VERBOSE_PBXCP NO
VERSIONPLIST_PATH project.app/version.plist
VERSION_INFO_BUILDER username
VERSION_INFO_FILE project_vers.c
VERSION_INFO_STRING "\"@(#)PROGRAM:project PROJECT:project-\""
WRAPPER_EXTENSION app
WRAPPER_NAME project.app
WRAPPER_SUFFIX .app
XCODE_APP_SUPPORT_DIR /Developer/Library/Xcode
XCODE_PRODUCT_BUILD_VERSION 4B110
XCODE_VERSION_ACTUAL 0410
XCODE_VERSION_MAJOR 0400
XCODE_VERSION_MINOR 0410
YACC /Developer/usr/bin/yacc
【讨论】:
如何打印所有这些设置? 要打印出所有这些,您必须添加一个只有指令“env”的运行脚本,构建并查看生成的控制台输出(Xcode 中的 cmd-7)。env
在构建脚本中可用于调试故障设置,但 @user493548's answer 是实际的规范答案,因为它是马口中的文档。仅查看 env 会丢失有关每个设置的用途以及所有设置如何相互影响的文档。最后一条信息(什么改变了什么)特别有用。
如果你只看 env,你也会失去关于 Apple 承诺的信息。如果你使用了没有记录的东西,墨菲定律要求你在下一个版本中会被破坏,可能需要几天的调试时间。
我在苹果的文档或手册页中找不到这个。有没有人找到关于 xcodebuild 的综合文档?【参考方案2】:
您还可以使用带有 -showBuildSettings 开关的 xcodebuild 命令从命令行获取此信息:
$ xcodebuild -project myProj.xcodeproj -target "myTarg" -showBuildSettings
这会将上面显示的列表转储到标准输出。
【讨论】:
由于这是从命令行触发的,它会看到 .bash_profile 中定义的变量,而 XCode GUI 看不到这些变量吗? 由于我们使用的是 xcworkspace,因此我为此设置了等效命令:xcodebuild -workspace WORKSPACE.xcworkspace -scheme SCHEME -showBuildSettings
这个-showBuildSettings
可以添加到参数部分的方案中吗?
我们如何读取代码中的构建设置?我想读取 CODE_SIGN_ENTITLEMENTS 变量以获取权利文件名。【参考方案3】:
尽管@dunedin15's fantastic answer 在很多情况下都为我提供了很好的帮助,但它可能会在某些边缘情况下给出不准确的结果,例如在调试存档构建的静态库的构建设置时。
作为替代方案,运行脚本构建阶段可以在构建时轻松添加到任何目标的“日志构建设置”:
要添加,(选择有问题的目标) 在 Build Phases 选项卡部分下单击小 ➕ 按钮,从 Target Dependencies 部分左上角十几个像素, 并将 shell 设置为/bin/bash
,将命令设置为export
。您可能还希望将阶段向上拖动,以便它发生在目标依赖项之后和复制标头或编译源之前。将阶段从“运行脚本”重命名为“日志构建设置”不是一个坏主意。
结果是用于构建的当前环境变量列表非常有用:
【讨论】:
是的,是的。这就是我一直在寻找的。span> 官方文档应该简单地链接这个并删除他们在那里的所有内容。作为旁注,但使用它我看到“构建产品路径”和“中间构建文件路径”在 xcode 中没有做任何事情,并且完全被忽略了。 @Pavel:嗯。官方不是 100% 有帮助,当然,但他们确实描述了每个设置的目的。通常,您会看到具有相同值的多个设置,但您不能只选择一个——在一个平台/构建级别/CPU 类型/编程语言/等上重复值。组合可能与另一个组合不同。官方文档有其目的,即使它们可以更充分地服务于该目的。 @Pavel 我相信解决这些问题的原因在于,在构建设置中,ios 默认值报告不正确(确保您已打开关卡——构建设置在组合中像垃圾一样令人困惑mode) 因为路径部分由方案确定,因此在您构建之前不是任何显式值。这些“build
”的值只是绝对默认值(由命令行工具项目IIRC使用,但在Cocoa/CocoaTouch项目中被覆盖)。 不过,如果您在 Build Settings 中提供自己的路径,它应该使用它。 更多信息:***.com/questions/29731884
@SlippD.Thompson 我使用绝对路径是因为我想确保我的所有输出都相对于源代码树(Visual Studio 的做法)。我构建了多个配置(ios、osx)并且没有使用这些值。我检查了 .cpp 文件和最终 .a 的命令行输出,无论我是否修改这些设置,所有这些命令都是完全相同的。 Here 也是另一个示例,其中解释了由于某种原因 SYMROOT
/ OBJROOT
被忽略。【参考方案4】:
Apple 的 "Build Setting Reference" documentation 用于官方记录的内容(或者如 rjstelling 的回答所示,在构建脚本中使用 env 来查看 Xcode 实际传递给您的内容。
如果上述链接发生变化,谷歌搜索: “构建设置参考”站点:developer.apple.com
【讨论】:
该链接:http://help.apple.com/xcode/mac/8.0/#/itcaec37c2a6
在 Dev 2016 中仍然有效且非常有用。谢谢。
自 2018 年 8 月 16 日起仍可用。
今天仍然可以访问。【参考方案5】:
上面已经回答了这个问题,但我想提出一个替代方案。
在您的项目或目标的构建设置中,您可以转到编辑器菜单并从菜单中选择Show Setting Names
。这会将“构建设置”窗格中的所有选项更改为构建变量名称。菜单中的选项更改为Show Setting Titles
,选择此项可更改回原始视图。
当您知道要在脚本中使用什么构建设置时,这会很方便,在菜单中切换设置名称即可看到变量名称。
【讨论】:
【参考方案6】:在 Xcode 4 和可能之前,在运行脚本构建阶段有一个选项“在构建阶段显示环境变量”。如果选中,这将在构建日志中以橄榄绿色背景显示。
【讨论】:
【参考方案7】:如果您想使用代码在运行时中阅读/检查您的Target Build Settings
,方法如下:
1) 添加Run Script
:
cp $PROJECT_FILE_PATH/project.pbxproj $CONFIGURATION_BUILD_DIR/$EXECUTABLE_NAME.app/BuildSetting.pbxproj
它会将Target Build Settings
文件复制到您的Main Bundle
(将被称为BuildSetting.pbxproj
)。
2) 您现在可以随时在代码中检查该文件的内容:
NSString *thePathString = [[NSBundle mainBundle] pathForResource:@"BuildSetting" ofType:@"pbxproj"];
NSDictionary *theDictionary = [NSDictionary dictionaryWithContentsOfFile:thePathString];
【讨论】:
编译错误如下:用法:cp [-R [-H | -L | -P]] [-f | -i | -n] [-apvX] 源文件目标文件 cp [-R [-H | -L | -P]] [-f | -i | -n] [-apvX] source_file ... target_directory 命令 /bin/sh 失败,退出代码为 64 @W.S 我的项目总是在桌面目录中,所以我的运行脚本是硬编码的,而不是通用的。如果您的项目位于其他目录中,您可能需要稍微更改运行脚本。以上是关于如何在 Xcode 项目中打印“构建设置”列表?的主要内容,如果未能解决你的问题,请参考以下文章
在 Xcode 4 中,如何构建“Debug”、“Ad hoc”和“Store”设置?