从高到低依次如下:
Build Settings
1、在终端执行xcodebuild
命令,并且添加-showBuildSettings
,就可以看到所有的编译设置了
2、打开项目在磁盘上的路径,找到项目名称.xcodeproj
文件,右键选择显示包内容
,找到project.pbxproj
文件,使用Xcode
打开
project.pbxproj
查看Build Setting
如下
文章链接:
https://help.apple.com/xcode/mac/10.0/#/dev382dac089
https://help.apple.com/xcode/mac/10.0/#/itcaec37c2a6
Architectures
架构Base SDK
(SDKROOT)编译的时候使用的sdk
Summary
The name or path of the base SDK being used during the build. The product will be built against the headers and libraries located inside the indicated SDK. This path will be prepended to all search paths, and will be passed through the environment to the compiler and linker. Additional SDKs can be specified in the `ADDITIONAL_SDKS` setting.
Declaration
SDKROOT
Value Type
SDK Identifier or Path
取值如下: 在终端通过命令xcodebuild -showsdks [-json]
来查看
iphoneos
macosx
appletvos
watchos
注意:是没有模拟器平台的
例子:
SDKROOT = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk
Additional SDKs
(ADDITIONAL_SDKS)编译的时候添加额外的sdk
,一般都是使用不到的
Summary
The locations of any sparse SDKs that should be layered on top of the one specified by `SDKROOT`. If more than one SDK is listed, the first one has highest precedence. Every SDK specified in this setting should be a "sparse" SDK, for example, not an SDK for an entire macOS release.
Declaration
ADDITIONAL_SDKS
Value Type
String List
Supported Platforms
(SUPPORTED_PLATFORMS)Base SDK
可以被使用的平台
Summary
The list of supported platforms from which a base SDK can be used. This setting is used if the product can be built for multiple platforms using different SDKs.
Declaration
SUPPORTED_PLATFORMS
Value Type
Platform Identifier List
取值如下:
iphoneos
iphonesimulator
macosx
appletvos
appletvsimulator
watchos
watchsimulator
例子:
SUPPORTED_PLATFORMS = iphonesimulator iphoneos
Architecures
(ARCHS)build
生成的产品product
支持的架构
Summary
A list of the architectures for which the product will be built. This is usually set to a predefined build setting provided by the platform. If more than one architecture is specified, a universal binary will be produced.
Declaration
ARCHS
Value Type
Architectures
例子:
ARCHS = armv7 arm64
ARCHS_STANDARD = armv7 arm64
ARCHS_STANDARD_32_64_BIT = armv7 arm64
ARCHS_STANDARD_32_BIT = armv7
ARCHS_STANDARD_64_BIT = arm64
ARCHS_STANDARD_INCLUDING_64_BIT = armv7 arm64
ARCHS_UNIVERSAL_IPHONE_OS = armv7 arm64
标准的是 $(ARCHS_STANDARD)
参考文章:
https://www.jianshu.com/p/567d3b730608
Valid Architectures
(VALID_ARCHS)build
实际产生的产品product
支持的架构,和 ARCHS
的交集才是最终需要编译的架构
Summary
A space-separated list of architectures for which the target should actually be built. For each target, this is intersected with the list specified in `ARCHS`, and the resulting set is built. This allows individual targets to opt out of building for particular architectures. If the resulting set of architectures is empty, no executable will be produced.
Declaration
VALID_ARCHS
Value Type
String List
例子:
VALID_ARCHS = arm64 armv7 armv7s
Build Active Architecture Only
(ONLY_ACTIVE_ARCH)是否只编译指定的arm架构,一般Debug
设置为YES
,Release
设置为NO
Summary
If enabled, only the active architecture is built.
Declaration
ONLY_ACTIVE_ARCH
Value Type
Boolean
例子:
ONLY_ACTIVE_ARCH = NO
Assets
资源的获取相关,和app thinning
相关
文章列表:
https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/On_Demand_Resources_Guide/index.html#//apple_ref/doc/uid/TP40015083-CH2-SW1
http://www.cocoachina.com/ios/20150615/12152.html
Asset Pack Mainfest URL Prefix
Embed Asset Packs In Product Bundle
Enable On Demand Resources
(ENABLE_ON_DEMAND_RESOURCES)summary
If enabled, tagged assets—files and asset catalog entries—are built into asset packs based on their combination of tags. Untagged resources are treated normally.
Declaration
ENABLE_ON_DEMAND_RESOURCES
Value Type
Boolean
On Demand Resources Initial Install Tags
On Demand Resources Prefetch Order
Build Locations
编译build
会产生临时的中间文件
Build Products Path
(SYMROOT)build
产生 products
存放的路径,一般是根据每个项目来的,默认是 $(PROJECT_DIR)/build
具体的是在Xcode
-> Locations
-> Derived Data
中
Summary
The path at which all products will be placed when performing a build. Typically this path is not set per target, but is set per-project or per-user. By default, this is set to `$(PROJECT_DIR)/build`.
Declaration
SYMROOT
Value Type
Path
例子:
SYMROOT = /Users/ocean/Library/Developer/Xcode/DerivedData/HaiZiGuoParents-awjrjakydlcetycddgxdbiiitwdv/Build/Products
Intermediate Build Files Path
(OBJROOT)中间的build
文件路径,默认是 $(PROJECT_DIR)/build
; (Intermediates.noindex
)
Summary
The path where intermediate files will be placed during a build. Intermediate files include generated sources, object files, etc. Shell script build phases can place and access files here, as well. Typically this path is not set per target, but is set per project or per user. By default, this is set to `$(PROJECT_DIR)/build`.
Declaration
OBJROOT
Value Type
Path
例子:
OBJROOT = /Users/ocean/Library/Developer/Xcode/DerivedData/HaiZiGuoParents-awjrjakydlcetycddgxdbiiitwdv/Build/Intermediates.noindex
都是一些中间文件.hmap
.sh
之类的
Per-configuration Build Products Path
(CONFIGURATION_BUILD_DIR)每个configuration
的Build Products
路径,默认是$(BUILD_DIR)/$(CONFIGURATION)
。
$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
Summary
The base path where build products will be placed during a build for a given configuration. By default, this is set to `$(BUILD_DIR)/$(CONFIGURATION)`.
Declaration
CONFIGURATION_BUILD_DIR
Value Type
Path
例子:
CONFIGURATION = Release
CONFIGURATION_BUILD_DIR = /Users/ocean/Library/Developer/Xcode/DerivedData/HaiZiGuoParents-awjrjakydlcetycddgxdbiiitwdv/Build/Products/Release-iphoneos
CONFIGURATION_TEMP_DIR = /Users/ocean/Library/Developer/Xcode/DerivedData/HaiZiGuoParents-awjrjakydlcetycddgxdbiiitwdv/Build/Intermediates.noindex/HaiZiGuoParents.build/Release-iphoneos
PODS_CONFIGURATION_BUILD_DIR = /Users/ocean/Library/Developer/Xcode/DerivedData/HaiZiGuoParents-awjrjakydlcetycddgxdbiiitwdv/Build/Products/Release-iphoneos
Per-configuration Intermediate Build Files Path
(CONFIGURATION_TEMP_DIR)中间文件,默认是 $(PROJECT_TEMP_DIR)/$(CONFIGURATION)
Summary
The base path where intermediates will be placed during a build for a given configuration. By default, this is set to `$(PROJECT_TEMP_DIR)/$(CONFIGURATION)`.
Declaration
CONFIGURATION_TEMP_DIR
Value Type
Path
例子:
CONFIGURATION_TEMP_DIR = /Users/ocean/Library/Developer/Xcode/DerivedData/HaiZiGuoParents-awjrjakydlcetycddgxdbiiitwdv/Build/Intermediates.noindex/HaiZiGuoParents.build/Release-iphoneos
Precompiled Headers Cache Path
(SHARED_PRECOMPS_DIR)预编译头文件缓存路径,默认是 $(OBJROOT)/SharedPrecompiledHeaders
Summary
The path where precompiled prefix header files are placed during a build. Defaults to `$(OBJROOT)/SharedPrecompiledHeaders`. Using a common location allows precompiled headers to be shared between multiple projects.
Declaration
SHARED_PRECOMPS_DIR
Value Type
Path
例子:
SHARED_PRECOMPS_DIR = /Users/ocean/Library/Developer/Xcode/DerivedData/HaiZiGuoParents-awjrjakydlcetycddgxdbiiitwdv/Build/Intermediates.noindex/PrecompiledHeaders
最后:
补充:
生成的中间文件夹和Products
的文件夹命名方式是配置-当前平台标识符
Build Options
Always Embed Swift Standard Libaries
(ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES)是否嵌入Swift
的标准库,及时没有Swift
代码
Summary
Always embed the Swift standard libraries in the target's products, even if the target does not contain any Swift code. For example, this should be enabled if the target is embedding other products which contain Swift, or if it is a test target which does not contain Swift but which is testing a product which does. This setting only applies to wrapped products, not to standalone binary products.
Declaration
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES
Value Type
Boolean
例子:
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO
Build Librayies for Distribution
(BUILD_LIBRARY_FOR_DISTRIBUTION)Summary
Ensures that your libraries are built for distribution. For Swift, this enables support for library evolution and generation of a module interface file.
Declaration
BUILD_LIBRARY_FOR_DISTRIBUTION
Value Type
Boolean
BUILD_LIBRARY_FOR_DISTRIBUTION=NO
Build Variants
(BUILD_VARIANTS)取值有: normal
debug
profile
,默认是 normal
Summary
A list of the build variants of the linked binary that will be produced. By default, only the `normal` variant is produced. Other common values include `debug` and `profile`.
Declaration
BUILD_VARIANTS
Value Type
String List
例子:
BUILD_VARIANTS = normal
Compiler for C/C++/Objective-C
(GCC_VERSION)使用的编译器 ,默认是 Apple Clang
GCC
指的就是编译器套件
Summary
The compiler to use for C, C++, and Objective-C.
Declaration
GCC_VERSION
Value Type
Compiler Version
例子:
GCC_VERSION = com.apple.compilers.llvm.clang.1_0
GCC_VERSION_IDENTIFIER = com_apple_compilers_llvm_clang_1_0
Debug Information Format
(DEBUG_INFORMATION_FORMAT)调试信息的格式,取值有:
dwarf
: 一般是debug
选择dwarf-with-dsym
: 一般是release
选择,为了定位线上crash包含了dsym
文件可以为线上bug
定位和还原
注意:不止
C
/OC
,还有一些其他语言也是使用GCC
进行编译,调试信息格式也是dwarf
Summary
The type of debug information to produce. * *DWARF:* Object files and linked products will use DWARF as the debug information format. [dwarf] * *DWARF with dSYM File:* Object files and linked products will use DWARF as the debug information format, and Xcode will also produce a dSYM file containing the debug information from the individual object files (except that a dSYM file is not needed and will not be created for static library or object file products). [dwarf-with-dsym]
Declaration
DEBUG_INFORMATION_FORMAT
Value Type
Enumeration (String)
例子:
DEBUGGING_SYMBOLS = YES
DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
Enable Bitcode
(ENABLE_BITCODE)bit code
是一种中间码,大致就是这样的 : OC
-> BitCode
-> 汇编指令
Summary
Activating this setting indicates that the target or project should generate bitcode during compilation for platforms and architectures that support it. For Archive builds, bitcode will be generated in the linked binary for submission to the App Store. For other builds, the compiler and linker will check whether the code complies with the requirements for bitcode generation, but will not generate actual bitcode.
Declaration
ENABLE_BITCODE
Value Type
Boolean
例子:
ENABLE_BITCODE = YES
参考文章:
https://www.jianshu.com/p/f42a33f5eb61
Enable Index-While-Building Functionality
(COMPILER_INDEX_STORE_ENABLE)取值:
Default
YES
NO
Summary
Control whether the compiler should emit index data while building.
Declaration
COMPILER_INDEX_STORE_ENABLE
Value Type
Enumeration (String)
例子:
COMPILER_INDEX_STORE_ENABLE = Default
Enable Previews
(ENABLE_PREVIEWS)Summary
If enabled, the product will be built with options appropriate for supporting previews.
Declaration
ENABLE_PREVIEWS
Value Type
Boolean
ENABLE_PREVIEWS=NO
Enable Testability
(ENABLE_TESTABILITY)自动化测试: 设置为YES
Summary
When this setting is activated, the product will be built with options appropriate for running automated tests, such as making private interfaces accessible to the tests. This may result in tests running slower than they would without testability enabled.
Declaration
ENABLE_TESTABILITY
Value Type
Boolean
例子:
ENABLE_TESTABILITY = NO
Enable Testing Search Paths
(ENABLE_TESTING_SEARCH_PATHS)测试使用 ,链接XCTest
框架和单元测试unit test target
会开启
Summary
Specifies whether the build system should add the search paths necessary for compiling and linking against XCTest. This setting is enabled by default if the target is a unit test target or if the target explicitly links to the XCTest framework.
Declaration
ENABLE_TESTING_SEARCH_PATHS
Value Type
Boolean
Excluded Source File Names
(EXCLUDED_SOURCE_FILE_NAMES)Summary
A list of patterns (as defined by `fnmatch(3)`) specifying the names of source files to explicitly *exclude* when processing the sources build phase (see also `INCLUDED_SOURCE_FILE_NAMES`). This setting can be used to define complex filters for which files from the phase should be built in response to other build settings; for example, a value of `*.$(CURRENT_ARCH).c` could serve to exclude particular files based on the architecture being built.
Declaration
EXCLUDED_SOURCE_FILE_NAMES
Value Type
String List
例子:
export EXCLUDED_INSTALLSRC_SUBDIRECTORY_PATTERNS=".DS_Store .svn .git .hg CVS"
export EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES="*.nib *.lproj *.framework *.gch *.xcode* *.xcassets (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj"
export EXCLUDED_SOURCE_FILE_NAMES="MyPerson.h MyPerson.m"
Included Source File Names
(INCLUDED_SOURCE_FILE_NAMES)Summary
A list of patterns (as defined by `fnmatch(3)`) specifying the names of source files to explicitly *include* when processing the sources build phase. This setting is only useful when combined with `EXCLUDED_SOURCE_FILE_NAMES`, and can be used to define complex filters for which files from the phase should be built in response to other build settings.
Declaration
INCLUDED_SOURCE_FILE_NAMES
Value Type
String List
Generate Profiling Code
(GENERATE_PROFILING_CODE)Summary
Activating this setting will cause the compiler and linker to generate profiling code. For example, GCC will generate code suitable for use with `gprof(1)`.
Declaration
GENERATE_PROFILING_CODE
Value Type
Boolean
例子:
GENERATE_PROFILING_CODE = NO
Precompiled Header Uses Files From Build Direcotry
(PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR)多项目之间的预编译头文件
Summary
This setting allows for better control of sharing precompiled prefix header files between projects. By default, Xcode assumes that the prefix header file may include header files from the build directory if the build directory is outside of the project directory. Xcode cannot determine this ahead of time since other projects may not have been built into the shared build directory at the time the information is needed. If your prefix file never includes files from the build directory you may set this to `NO` to improve sharing of precompiled headers. If the prefix does use files from a build directory that is inside your project directory, you may set this to `YES` to avoid unintended sharing that may result in build failures.
Declaration
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR
Value Type
Boolean
例子:
PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = YES
Require Only App-Extension-Safe API
(APPLICATION_EXTENSION_API_ONLY)Summary
When enabled, this causes the compiler and linker to disallow use of APIs that are not available to app extensions and to disallow linking to frameworks that have not been built with this setting enabled.
Declaration
APPLICATION_EXTENSION_API_ONLY
Value Type
Boolean
例子:
APPLICATION_EXTENSION_API_ONLY = NO
Scan All Source Files for Includes
(SCAN_ALL_SOURCE_FILES_FOR_INCLUDES)Summary
Activating this setting will cause all source files to be scanned for includes (for example, of header files) when computing the dependency graph, in which case if an included file is changed then the including file will be rebuilt next time a target containing it is built. Normally only certain types of files, such as C-language source files, are scanned. This setting is useful if your project contains files of unusual types, which are compiled using a custom build rule.
Declaration
SCAN_ALL_SOURCE_FILES_FOR_INCLUDES
Value Type
Boolean
例子:
SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = NO
Validate Built Product
(VALIDATE_PRODUCT)是否执行校验product
步骤;
Debug
: NO
Release
: YES
Summary
If enabled, perform validation checks on the product as part of the build process.
Declaration
VALIDATE_PRODUCT
Value Type
Boolean
例子:
VALIDATE_PRODUCT = YES
Validate Workspace
(VALIDATE_WORKSPACE)校验workspace的配置
Summary
If enabled, perform validation checks on the workspace configuration as part of the build process.
Declaration
VALIDATE_WORKSPACE
Value Type
Enumeration (String)
例子
VALIDATE_WORKSPACE=YES_ERROR
Validate Workspace - Ignored Frameworks
(VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS)Summary
List of framework names for which to suppress deprecation warnings and missing framework errors in the workspace validator.
Declaration
VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS
Value Type
String List
Deployment
调度,部署Deployment Location
(DEPLOYMENT_LOCATION)Summary
If enabled, built products are placed in their installed locations in addition to the built products folder.
Declaration
DEPLOYMENT_LOCATION
Value Type
Boolean
例子:
DEPLOYMENT_LOCATION = NO
Deployment Postprocessing
(DEPLOYMENT_POSTPROCESSING)Summary
If enabled, indicates that binaries should be stripped and file mode, owner, and group information should be set to standard values.
Declaration
DEPLOYMENT_POSTPROCESSING
Value Type
Boolean
例子
DEPLOYMENT_POSTPROCESSING = NO
Additional Strip Flags
(STRIPFLAGS)Summary
Additional flags to be passed when stripping the linked product of the build.
Declaration
STRIPFLAGS
Value Type
String List
Strip Debug Symbols During Copy
(COPY_PHASE_STRIP)build
期间copy
文件: Bundle Resources
Copy Files build phase
Summary
Specifies whether binary files that are copied during the build, such as in a Copy Bundle Resources or Copy Files build phase, should be stripped of debugging symbols. It does not cause the linked product of a target to be stripped—use `STRIP_INSTALLED_PRODUCT` for that.
Declaration
COPY_PHASE_STRIP
Value Type
Boolean
例子:
COPY_PHASE_STRIP = NO
Strip Linked Product
(STRIP_INSTALLED_PRODUCT)Summary
If enabled, the linked product of the build will be stripped of symbols when performing deployment postprocessing.
Declaration
STRIP_INSTALLED_PRODUCT
Value Type
Boolean
例子:
STRIP_INSTALLED_PRODUCT = YES
Strip Style
(STRIP_STYLE)取值:
Summary
The level of symbol stripping to be performed on the linked product of the build. The default value is defined by the target's product type. * *All Symbols:* Completely strips the binary, removing the symbol table and relocation information. [all, -s] * *Non-Global Symbols:* Strips non-global symbols, but saves external symbols. [non-global, -x] * *Debugging Symbols:* Strips debugging symbols, but saves local and global symbols. [debugging, -S]
Declaration
STRIP_STYLE
Value Type
Enumeration (String)
例子:
STRIP_STYLE = all
Strip Swift Symbols
(STRIP_SWIFT_SYMBOLS)Swift
符号是否会被移除
Summary
Adjust the level of symbol stripping specified by the STRIP_STYLE setting so that when the linked product of the build is stripped, all Swift symbols will be removed.
Declaration
STRIP_SWIFT_SYMBOLS
Value Type
Boolean
例子:
STRIP_SWIFT_SYMBOLS = YES
Alternate Install Group
(ALTERNATE_GROUP)Alternate
: 替换的意思
mac
系统的用户群组,和文件访问权限有关
Summary
The group name or gid for the files listed under the `ALTERNATE_PERMISSIONS_FILES` setting.
Declaration
ALTERNATE_GROUP
Value Type
String
例子:
ALTERNATE_GROUP = staff
Alternate Install Owner
(ALTERNATE_OWNER)Summary
The owner name or uid for the files listed under the `ALTERNATE_PERMISSIONS_FILES` setting.
Declaration
ALTERNATE_OWNER
Value Type
String
例子:
ALTERNATE_OWNER = ocean
Alternate Install Permissions
(ALTERNATE_MODE)和文件访问权限有关
Summary
Permissions used for the files listed under the `ALTERNATE_PERMISSIONS_FILES` setting.
Declaration
ALTERNATE_MODE
Value Type
String
例子:
ALTERNATE_MODE = u+w,go-w,a+rX
参考文章:
https://blog.csdn.net/BjarneCpp/article/details/79912495
https://blog.csdn.net/uniquewonderq/article/details/50774484
Alternate Permissions Files
(ALTERNATE_PERMISSIONS_FILES)Summary
List of files to which the alternate owner, group and permissions are applied.
Declaration
ALTERNATE_PERMISSIONS_FILES
Value Type
String List
Install Group
(INSTALL_GROUP)$(GROUP)
Summary
The group name or `gid` for installed products.
Declaration
INSTALL_GROUP
Value Type
String
例子:
INSTALL_GROUP = staff
Install Owner
(INSTALL_OWNER)$(USER)
Summary
The owner name or `uid` for installed products.
Declaration
INSTALL_OWNER
Value Type
String
例子:
INSTALL_OWNER = ocean
Install Permissions
(INSTALL_MODE_FLAG)Summary
Permissions used for installed product files.
Declaration
INSTALL_MODE_FLAG
Value Type
String
例子:
INSTALL_MODE_FLAG = u+w,go-w,a+rX
Installation Build Products Location
(DSTROOT)/tmp/$(PROJECT_NAME).dst
Summary
The path at which all products will be rooted when performing an install build. For instance, to install your products on the system proper, set this path to `/`. Defaults to `/tmp/$(PROJECT_NAME).dst` to prevent a *test* install build from accidentally overwriting valid and needed data in the ultimate install path. Typically this path is not set per target, but is provided as an option on the command line when performing an `xcodebuild install`. It may also be set in a build configuration in special circumstances.
Declaration
DSTROOT
Value Type
Path
例子:
DSTROOT = /tmp/HaiZiGuoParents.dst
Installation Directory
(INSTALL_PATH)$(LOCAL_APPS_DIR)
,也就是 /Applications
Summary
The directory in which to install the build products. This path is prepended by the `DSTROOT`.
Declaration
INSTALL_PATH
Value Type
String
例子:
INSTALL_PATH = /Applications
INSTALL_DIR = /tmp/HaiZiGuoParents.dst/Applications
Skip Install
(SKIP_INSTALL)Summary
If enabled, don't install built products even if deployment locations are active.
Declaration
SKIP_INSTALL
Value Type
Boolean
例子:
SKIP_INSTALL = NO
Targeted Device Family
(TARGETED_DEVICE_FAMILY)编译选中的设备 这个值会被合并到 Info.plist
中
Summary
The build system uses the selected device to set the correct value for the `UIDeviceFamily` key it adds to the target's `Info.plist` file. This also drives the --target-device flag to actool, which determines the idioms selected during catalog compilation for iOS platforms.
Declaration
TARGETED_DEVICE_FAMILY
Value Type
Enumeration (String)
例子:
TARGETED_DEVICE_FAMILY = 1,2
说明:
1
: (Default) The app runs on iPhone and iPod touch devices.
2
: The app runs on iPad devices.
参考文章
https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html
https://blog.csdn.net/diyagoanyhacker/article/details/6583445
Resources Targeted Device Family
(RESOURCES_TARGETED_DEVICE_FAMILY)Summary
Overrides `TARGETED_DEVICE_FAMILY` when the resource copying needs to differ from the default targeted device.
Declaration
RESOURCES_TARGETED_DEVICE_FAMILY
Value Type
String List
iOS Deployment Target
(IPHONEOS_DEPLOYMENT_TARGET)支持的最低版本
Summary
Code will load on this and later versions of iOS. Framework APIs that are unavailable in earlier versions will be weak-linked; your code should check for null function pointers or specific system versions before calling newer APIs.
Declaration
IPHONEOS_DEPLOYMENT_TARGET
Value Type
Enumeration (String)
例子:
IPHONEOS_DEPLOYMENT_TARGET = 7.0
一些其他的
DEPLOYMENT_TARGET_CLANG_ENV_NAME = IPHONEOS_DEPLOYMENT_TARGET
DEPLOYMENT_TARGET_CLANG_FLAG_NAME = miphoneos-version-min
DEPLOYMENT_TARGET_CLANG_FLAG_PREFIX = -miphoneos-version-min=
DEPLOYMENT_TARGET_LD_ENV_NAME = IPHONEOS_DEPLOYMENT_TARGET
DEPLOYMENT_TARGET_LD_FLAG_NAME = ios_version_min
DEPLOYMENT_TARGET_SETTING_NAME = IPHONEOS_DEPLOYMENT_TARGET
DEPLOYMENT_TARGET_SUGGESTED_VALUES = 8.0 8.1 8.2 8.3 8.4 9.0 9.1 9.2 9.3 10.0 10.1 10.2 10.3 11.0 11.1 11.2 11.3 11.4 12.0 12.1
macOS Deployment Target
(MACOSX_DEPLOYMENT_TARGET)Summary
Code will load on this and later versions of macOS. Framework APIs that are unavailable in earlier versions will be weak-linked; your code should check for null function pointers or specific system versions before calling newer APIs.
Declaration
MACOSX_DEPLOYMENT_TARGET
Value Type
Enumeration (String)
tvOS Deployment Target
watchOS Deployment Target
Headers
Kernel Module
内核Linking
Bundle Loader
(BUNDLE_LOADER)Summary
Specifies the executable that will load the bundle output file being linked. Undefined symbols from the bundle are checked against the specified executable as if it is one of the dynamic libraries the bundle was linked with.
Declaration
BUNDLE_LOADER
Value Type
String
Compatiblility Version
(DYLIB_COMPATIBILITY_VERSION)动态库加载相关
Summary
Determines the compatibility version of the resulting library, bundle, or framework binary. See [Dynamic Library Design Guidelines](https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html#//apple_ref/doc/uid/TP40002013-SW19) in [Dynamic Library Programming Topics](https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/DynamicLibraries/000-Introduction/Introduction.html) for details on assigning version numbers of dynamic libraries.
Declaration
DYLIB_COMPATIBILITY_VERSION
Value Type
String
Current Library Version
(DYLIB_CURRENT_VERSION)默认是 CURRENT_PROJECT_VERSION
Summary
This setting defines the current version of any framework built by the project. As with `CURRENT_PROJECT_VERSION`, the value must be an integer or floating point number, such as `57` or `365.8`. By default, it is set to `$(CURRENT_PROJECT_VERSION)`. See [Dynamic Library Design Guidelines](https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html#//apple_ref/doc/uid/TP40002013-SW19) in [Dynamic Library Programming Topics](https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/DynamicLibraries/000-Introduction/Introduction.html) for details on assigning version numbers of dynamic libraries.
Declaration
DYLIB_CURRENT_VERSION
Value Type
String
Dead Code Stripping
(DEAD_CODE_STRIPPING)Summary
Activating this setting causes the `-dead_strip` flag to be passed to `ld(1)` via `cc(1)` to turn on dead code stripping.
Declaration
DEAD_CODE_STRIPPING
Value Type
Boolean
例子:
DEAD_CODE_STRIPPING = YES
Display Magnled Names
(LINKER_DISPLAYS_MANGLED_NAMES)Summary
Activating this setting causes the linker to display mangled names for C++ symbols. Normally, this is not recommended, but turning it on can help to diagnose and solve C++ link errors.
Declaration
LINKER_DISPLAYS_MANGLED_NAMES
Value Type
Boolean
例子:
LINKER_DISPLAYS_MANGLED_NAMES = NO
Dont't Dead-Strip Inits and Terms
(PRESERVE_DEAD_CODE_INITS_AND_TERMS)Summary
Activating this setting, in combination with the `DEAD_CODE_STRIPPING` (`-dead_strip`) option, causes the `-no_dead_strip_inits_and_terms` flag to be passed to `ld(1)` via `cc(1)` to disable dead code stripping for initialization and termination routines. This option should not be used without the aforementioned `DEAD_CODE_STRIPPING` option.
Declaration
PRESERVE_DEAD_CODE_INITS_AND_TERMS
Value Type
Boolean
例子:
PRESERVE_DEAD_CODE_INITS_AND_TERMS = NO
Dynaminc Library Install Name
(LD_DYLIB_INSTALL_NAME)Summary
Sets an internal `install path` (`LC_ID_DYLIB`) in a dynamic library. Any clients linked against the library will record that path as the way `dyld` should locate this library. If this option is not specified, then the `-o` path will be used. This setting is ignored when building any product other than a dynamic library. See [Dynamic Library Programming Topics](https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/DynamicLibraries/000-Introduction/Introduction.html).
Declaration
LD_DYLIB_INSTALL_NAME
Value Type
Path
Dynaminc Library Install Name Base
(DYLIB_INSTALL_NAME_BASE)Summary
Sets the base value for the internal `install path` (`LC_ID_DYLIB`) in a dynamic library. This will be combined with the `EXECUTABLE_PATH` to form the full install path. Setting `LD_DYLIB_INSTALL_NAME` directly will override this setting. This setting defaults to the target's `INSTALL_PATH`. It is ignored when building any product other than a dynamic library.
Declaration
DYLIB_INSTALL_NAME_BASE
Value Type
String
Exported Symbols File
(EXPORTED_SYMBOLS_FILE)Summary
This is a project-relative path to a file that lists the symbols to export. See `ld -exported_symbols_list` for details on exporting symbols.
Declaration
EXPORTED_SYMBOLS_FILE
Value Type
String
Generate Position-Dependent Executable
(LD_NO_PIE)Summary
Activating this setting will prevent Xcode from building a main executable that is position independent (PIE). When targeting macOS 10.7 or later, PIE is the default for main executables, so activating this setting will change that behavior. When targeting OS X 10.6 or earlier, or when building for i386, PIE is not the default, so activating this setting does nothing. You cannot create a PIE from `.o` files compiled with `-mdynamic-no-pic`. Using PIE means the codegen is less optimal, but the address randomization adds some security.
Declaration
LD_NO_PIE
Value Type
Boolean
例子:
LD_NO_PIE = NO
Initialization Routine
(INIT_ROUTINE)Summary
This is the name of the routine to use for initialization.
Declaration
INIT_ROUTINE
Value Type
String
Link With Standard Libraries
(LINK_WITH_STANDARD_LIBRARIES)Summary
When this setting is enabled, the compiler driver will automatically pass its standard libraries to the linker to use during linking. If desired, this flag can be used to disable linking with the standard libraries, and then individual libraries can be passed as `OTHER_LDFLAGS`.
Declaration
LINK_WITH_STANDARD_LIBRARIES
Value Type
Boolean
例子:
LINK_WITH_STANDARD_LIBRARIES = YES
Mach-O Type
(MACH_O_TYPE)参考文章
取值有:
Summary
This setting determines the format of the produced binary and how it can be linked when building other binaries. For information on binary types, see [Building Mach-O Files](https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/MachOTopics/1-Articles/building_files.html#//apple_ref/doc/uid/TP40001828-SW1) in [Mach-O Programming Topics](https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/MachOTopics/0-Introduction/introduction.html). * *Executable:* Executables and standalone binaries and cannot be linked. [mh_execute] * *Dynamic Library:* Dynamic libraries are linked at build time and loaded automatically when needed. [mh_dylib] * *Bundle:* Bundle libraries are loaded explicitly at run time. [mh_bundle] * *Static Library:* Static libraries are linked at build time and loaded at execution time. [staticlib] * *Relocatable Object File:* Object files are single-module files that are linked at build time. [mh_object]
Declaration
MACH_O_TYPE
Value Type
Enumeration (String)
例子:
MACH_O_TYPE = mh_execute
Order File
Summary
The path to a file that alters the order in which functions and data are laid out. For each section in the output file, any symbol in that section that are specified in the order file is moved to the start of its section and laid out in the same order as in the order file. Order files are text files with one symbol name per line. Lines starting with a `#` are comments. A symbol name may be optionally preceded with its object file leafname and a colon (for example, `foo.o:_foo`). This is useful for static functions/data that occur in multiple files. A symbol name may also be optionally preceded with the architecture (for example, `ppc:_foo` or `ppc:foo.o:_foo`). This enables you to have one order file that works for multiple architectures. Literal C-strings may be ordered by quoting the string in the order file (for example, `"Hello, world\n"`). Generally you should not specify an order file in Debug or Development configurations, as this will make the linked binary less readable to the debugger. Use them only in Release or Deployment configurations.
Declaration
ORDER_FILE
Value Type
String
Other Libraries Flags
(OTHER_LIBTOOLFLAGS)Summary
Options defined in this setting are passed to all invocations of the archive librarian, which is used to generate static libraries.
Declaration
OTHER_LIBTOOLFLAGS
Value Type
String List
Other Linker Flags
(OTHER_LDFLAGS)链接的库
Summary
Options defined in this setting are passed to invocations of the linker.
Declaration
OTHER_LDFLAGS
Value Type
String List
例子:
OTHER_LDFLAGS = -ObjC -l"AFNetworking" -l"BlocksKit" -l"MGSwipeTableCell" -l"Masonry" -l"RegexKitLite" -l"SystemServices" -l"Valet" -l"WZLBadge" -l"ZipArchive" -l"c++" -l"icucore" -l"z" -framework "AMapFoundationKit" -framework "AMapSearchKit" -framework "AVFoundation" -framework "CoreGraphics" -framework "CoreLocation" -framework "CoreMotion" -framework "CoreTelephony" -framework "CoreText" -framework "ExternalAccessory" -framework "Foundation" -framework "GLKit" -framework "JavaScriptCore" -framework "MAMapKit" -framework "MessageUI" -framework "MobileCoreServices" -framework "OpenGLES" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" -framework "UIKit"
Path to Link Map File
(LD_MAP_FILE_PATH)默认值是 $(TARGET_TEMP_DIR)/$(PRODUCT_NAME)-LinkMap-$(CURRENT_VARIANT)-$(CURRENT_ARCH).txt
Summary
This setting defines the path to the map file written by the linker when the `LD_GENERATE_MAP_FILE` setting is activated. By default, a separate file will be written for each architecture and build variant, and these will be generated in the Intermediates directory for the target whose product is being linked.
Declaration
LD_MAP_FILE_PATH
Value Type
Path
例子:
LD_MAP_FILE_PATH = /Users/ocean/Library/Developer/Xcode/DerivedData/HaiZiGuoParents-awjrjakydlcetycddgxdbiiitwdv/Build/Intermediates.noindex/HaiZiGuoParents.build/Release-iphoneos/HaiZiGuoParents.build/HaiZiGuoParents-LinkMap-normal-arm64.txt
Perform Single-Object Prelink
(GENERATE_MASTER_OBJECT_FILE)Summary
Activating this setting will cause the object files built by a target to be prelinked using `ld -r` into a single object file, and that object file will then be linked into the final product. This is useful to force the linker to resolve symbols and link the object files into a single module before building a static library. Also, a separate set of link flags can be applied to the prelink allowing additional control over, for instance, exported symbols.
Declaration
GENERATE_MASTER_OBJECT_FILE
Value Type
Boolean
例子:
GENERATE_MASTER_OBJECT_FILE = NO
Prelink libraries
(PRELINK_LIBS)Summary
Additional libraries to pass when performing a single-object prelink.
Declaration
PRELINK_LIBS
Value Type
String List
Preserve Private External Symbols
Summary
Activating this setting will preserve private external symbols, rather than turning them into static symbols. This setting is also respected when performing a single-object prelink.
Declaration
KEEP_PRIVATE_EXTERNS
Value Type
Boolean
例子:
KEEP_PRIVATE_EXTERNS = NO
Quote Linker Arguments
(LD_QUOTE_LINKER_ARGUMENTS_FOR_COMPILER_DRIVER)Summary
This setting controls whether arguments to the linker should be quoted using `-Xlinker`. By default, Xcode invokes the linker by invoking the driver of the compiler used to build the source files in the target, and passing `-Xlinker` to quote arguments will cause the compiler driver to pass them through to the linker (rather than trying to evaluate them within the driver). By default, this setting is enabled. Disabling it will cause Xcode to not use `-Xlinker` to pass arguments to the linker. Disabling this setting is useful if the target has instructed Xcode to use an alternate linker (for example, by setting the `LD` setting to the path to another linker) and that alternate linker does not recognize `-Xlinker`.
Declaration
LD_QUOTE_LINKER_ARGUMENTS_FOR_COMPILER_DRIVER
Value Type
Boolean
例子:
LD_QUOTE_LINKER_ARGUMENTS_FOR_COMPILER_DRIVER = YES
Re-Exported Framework Names
(REEXPORTED_FRAMEWORK_NAMES)Summary
List of framework names that should have their symbols be reexported from the built library.
Declaration
REEXPORTED_FRAMEWORK_NAMES
Value Type
String List
Re-Exported Library Names
(REEXPORTED_LIBRARY_NAMES)Summary
List of library names that should have their symbols be reexported from the built library.
Declaration
REEXPORTED_LIBRARY_NAMES
Value Type
String List
Re-Exported Library Paths
(REEXPORTED_LIBRARY_PATHS)Summary
List of library paths that should have their symbols be reexported from the built library.
Declaration
REEXPORTED_LIBRARY_PATHS
Value Type
Path List
Runpath Search Paths
Summary
This is a list of paths to be added to the `runpath` search path list for the image being created. At runtime, `dyld` uses the `runpath` when searching for dylibs whose load path begins with `@rpath/`. See [Dynamic Library Programming Topics](https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/DynamicLibraries/000-Introduction/Introduction.html).
Declaration
LD_RUNPATH_SEARCH_PATHS
Value Type
String List
Separately Edit Symbols
(SEPARATE_SYMBOL_EDIT)Summary
Activating this setting when the linked product's symbols are to be edited will cause editing to occur via a separate invocation of `nmedit(1)`. Otherwise editing will occur during linking, if possible.
Declaration
SEPARATE_SYMBOL_EDIT
Value Type
Boolean
例子:
SEPARATE_SYMBOL_EDIT = NO
Single-Object Prelink Flags
(PRELINK_FLAGS)Summary
Additional flags to pass when performing a single-object prelink.
Declaration
PRELINK_FLAGS
Value Type
String List
Symbol Ordering Flags
(SECTORDER_FLAGS)Summary
These flags are typically used to specify options for ordering symbols within segments, for example the `-sectorder` option to `ld`. Generally you should not specify symbol ordering options in Debug or Development configurations, as this will make the linked binary less readable to the debugger. Use them only in Release or Deployment configurations.
Declaration
SECTORDER_FLAGS
Value Type
String List
Unexported Symbols Files
(UNEXPORTED_SYMBOLS_FILE)Summary
A project-relative path to a file that lists the symbols not to export. See `ld -exported_symbols_list` for details on exporting symbols.
Declaration
UNEXPORTED_SYMBOLS_FILE
Value Type
String
Warnings Linker Flags
(WARNING_LDFLAGS)Summary
These flags are passed with linker invocations, and by default give the `-no_arch_warnings` flag to the linker to avoid many warnings being generated during multi-architecture builds.
Declaration
WARNING_LDFLAGS
Value Type
String List
Write Link Map File
(LD_GENERATE_MAP_FILE)Summary
Activating this setting will cause the linker to write a map file to disk, which details all symbols and their addresses in the output image. The path to the map file is defined by the `LD_MAP_FILE_PATH` setting.
Declaration
LD_GENERATE_MAP_FILE
Value Type
Boolean
例子:
LD_GENERATE_MAP_FILE = NO
Localization
本地化Localized String Macro Names
Summary
The base names for NSLocalizedString-like macros or functions used to produce localized strings in source code. The default base names of NSLocalizedString and CFLocalizedString are always considered, even if this setting is empty.
Declaration
LOCALIZED_STRING_MACRO_NAMES
Value Type
String List
例子:
LOCALIZED_STRING_MACRO_NAMES = NSLocalizedString CFLocalizedString
Packaging
Convert Copied Files
(APPLY_RULES_IN_COPY_FILES)Copy Resources
步骤的一些文件的处理,
NO
: 默认是不做任何处理的YES
: 会对 .plist
文件和 字符串文件strings files
进行格式转换处理
.plist
: 转换为 PLIST_FILE_OUTPUT_FORMAT
格式strings files
: 转换为 STRINGS_FILE_OUTPUT_ENCODING
格式Summary
Files copied with a Copy Files build phase are unchanged by default. Setting this to `TRUE` causes property list files (`.plist`) and strings files to be converted as specified by `PLIST_FILE_OUTPUT_FORMAT` and `STRINGS_FILE_OUTPUT_ENCODING`.
Declaration
APPLY_RULES_IN_COPY_FILES
Value Type
Boolean
Property List Output Encoding
(PLIST_FILE_OUTPUT_FORMAT).plist
文件的输出格式,取值有:
.plist
binary
:XML
Summary
Specifies the output encoding for property list files (`.plist`). The output encodings can be `binary` or `XML`. By default, the output encoding will be unchanged from the input.
Declaration
PLIST_FILE_OUTPUT_FORMAT
Value Type
Enumeration (String)
例子
PLIST_FILE_OUTPUT_FORMAT=binary
Strings File Output Encoding
(STRINGS_FILE_OUTPUT_ENCODING)Strings files
的输出格式,取值是 NSStringEncoding
支持的格式
Summary
Specify the encoding to be used for Strings files (by default, the output encoding will be 16-bit Unicode). The value can be either an `NSStringEncoding`, such as one of the numeric values recognized by `NSString`, or it can be an IANA character set name as understood by `CFString`. The operation will fail if the file cannot be converted to the specified encoding.
Declaration
STRINGS_FILE_OUTPUT_ENCODING
Value Type
Enumeration (String)
例子
STRINGS_FILE_OUTPUT_ENCODING=binary
Create Info.plist Section In Binary
(CREATE_INFOPLIST_SECTION_IN_BINARY)创建Info.plist
文件,只适用于通过命令行处理的targets
Summary
Enabling this setting will create a section in the product's linked binary containing the processed `Info.plist` file for the target. This setting only applies to command-line tool targets.
Declaration
CREATE_INFOPLIST_SECTION_IN_BINARY
Value Type
Boolean
Info.plist
(INFOPLIST_FILE)Info.plist
文件的路径 Information Property List Files
Summary
The project-relative path to the property list file that contains the `Info.plist` information used by bundles. For details on information property list files, see [Information Property List Files](https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/ConfigFiles.html#//apple_ref/doc/uid/20002091-CJBJIEDH) in [Runtime Configuration Guidelines](https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPRuntimeConfig/000-Introduction/introduction.html).
Declaration
INFOPLIST_FILE
Value Type
Path
INFOPLIST_FILE=StudyBuild/Info.plist
Preprocess Info.plist File
(INFOPLIST_PREPROCESS)默认为 NO
Summary
Preprocess the `Info.plist` file using the C Preprocessor.
Declaration
INFOPLIST_PREPROCESS
Value Type
Boolean
Info.plist Other Preprocessor Flags
(INFOPLIST_OTHER_PREPROCESSOR_FLAGS)Summary
Other flags to pass to the C preprocessor when preprocessing the `Info.plist` file.
Declaration
INFOPLIST_OTHER_PREPROCESSOR_FLAGS
Value Type
String List
Info.plist Other Preprocessor Definitions
(INFOPLIST_PREPROCESSOR_DEFINITIONS)可以被 Info.plist
文件识别的预处理宏定义
Summary
Space-separated list of preprocessor macros of the form `foo` or `foo=bar`. These macros are used when preprocessing the `Info.plist` file.
Declaration
INFOPLIST_PREPROCESSOR_DEFINITIONS
Value Type
String List
Info.plist Other Preprocessor Prefix File
(INFOPLIST_PREFIX_HEADER)处理 Info.plist
文件时的输入文件 (相对于项目的路径,或绝对路径)
Summary
Implicitly include the given file when preprocessing the `Info.plist` file. The path given should either be a project relative path or an absolute path.
Declaration
INFOPLIST_PREFIX_HEADER
Value Type
String
Info.plist Output Encoding
(INFOPLIST_OUTPUT_FORMAT)和 Property List Output Encoding (PLIST_FILE_OUTPUT_FORMAT)
相同
.plist
文件的输出格式,取值有:
.plist
binary
:XML
Summary
Specifies the output encoding for the output `Info.plist`. The output encodings can be `binary` or `XML`. By default, the output encoding will be unchanged from the input.
Declaration
INFOPLIST_OUTPUT_FORMAT
Value Type
Enumeration (String)
Expand Build Settings In Info.plist File
(INFOPLIST_EXPAND_BUILD_SETTINGS)项目下的 info.plist
文件会添加一些内容,最终放到 .app
下的 info.plist
文件中,比如 AppIcon
LaunchImage
等
Summary
Expand build settings in the `Info.plist` file.
Declaration
INFOPLIST_EXPAND_BUILD_SETTINGS
Value Type
Boolean
例子
INFOPLIST_EXPAND_BUILD_SETTINGS=YES
Defins Module
(DEFINES_MODULE)是否定义为模块
Summary
If enabled, the product will be treated as defining its own module. This enables automatic production of LLVM module map files when appropriate, and allows the product to be imported as a module.
Declaration
DEFINES_MODULE
Value Type
Boolean
Module Map File
(MODULEMAP_FILE)Summary
This is the project-relative path to the LLVM module map file that defines the module structure for the compiler. If empty, it will be automatically generated for appropriate products when `DEFINES_MODULE` is enabled.
Declaration
MODULEMAP_FILE
Value Type
String
Private Module Map File
(MODULEMAP_PRIVATE_FILE)Summary
This is the project-relative path to the LLVM module map file that defines the module structure for private headers.
Declaration
MODULEMAP_PRIVATE_FILE
Value Type
String
Framework Version
(FRAMEWORK_VERSION)Summary
Framework bundles are versioned by having contents in subfolders of a version folder that has links to the current version and its contents.
Declaration
FRAMEWORK_VERSION
Value Type
String
Executable Extension
(EXECUTABLE_EXTENSION)默认的是会根据 product type
会有默认值
Summary
This is the extension used for the executable product generated by the target, which has a default value based on the product type.
Declaration
EXECUTABLE_EXTENSION
Value Type
String
Executable Prefix
(EXECUTABLE_PREFIX)默认的是会根据 product type
会有默认值
Summary
The prefix used for the executable product generated by the target, which has a default value based on the product type.
Declaration
EXECUTABLE_PREFIX
Value Type
String
Warpper Extension
(WRAPPER_EXTENSION)build
生成的product
后缀,默认是 app
Summary
The extension used for product wrappers, which has a default value based on the product type.
Declaration
WRAPPER_EXTENSION
Value Type
String
WRAPPER_EXTENSION=app
WRAPPER_NAME=StudyBuild.app
WRAPPER_SUFFIX=.app
Product Name
(PRODUCT_NAME)默认是 $(TARGET_NAME)
Summary
This is the basename of the product generated by the target.
Declaration
PRODUCT_NAME
Value Type
String
例子
PRODUCT_NAME=StudyBuild
Product Module Name
(PRODUCT_MODULE_NAME)默认是 $(PRODUCT_NAME:c99extidentifier)
Summary
The name to use for the source code module constructed for this target, and which will be used to import the module in implementation source files. Must be a valid identifier.
Declaration
PRODUCT_MODULE_NAME
Value Type
String
Product Bundle Identifier
(PRODUCT_BUNDLE_IDENTIFIER)bundle id
:
reverse DNS format
A-Z
a-z
0-9
.
-
Summary
A string that uniquely identifies the bundle. The string should be in reverse DNS format using only alphanumeric characters (`A-Z`, `a-z`, `0-9`), the dot (`.`), and the hyphen (`-`). This value is used as the `CFBundleIdentifier` in the `Info.plist` of the built bundle.
Declaration
PRODUCT_BUNDLE_IDENTIFIER
Value Type
String
PRODUCT_BUNDLE_IDENTIFIER=ocean.StudyBuild
Public Headers Folder Path
(PUBLIC_HEADERS_FOLDER_PATH)默认 $(CONTENTS_FOLDER_PATH)/Headers
Summary
The location to copy the public headers to during building, relative to the built products folder.
Declaration
PUBLIC_HEADERS_FOLDER_PATH
Value Type
Path
Private Headers Folder Path
(PRIVATE_HEADERS_FOLDER_PATH)Summary
The location to copy the private headers to during building, relative to the built products folder.
Declaration
PRIVATE_HEADERS_FOLDER_PATH
Value Type
Path
Preserve HFS Data
(COPYING_PRESERVES_HFS_DATA)Summary
Causes the copying of resources to preserve resource forks and Finder info.
Declaration
COPYING_PRESERVES_HFS_DATA
Value Type
Boolean
Force Package Info Generation
(GENERATE_PKGINFO_FILE)默认是 YES
,会生成打包信息放到 .app
目录下
Summary
Forces the `PkgInfo` file to be written to wrapped products even if this file is not expected.
Declaration
GENERATE_PKGINFO_FILE
Value Type
Boolean
Search Paths
Always Search User Paths (Deprecated)
废除不使用Framework Search Paths
(FRAMEWORK_SEARCH_PATHS)编译器查找的frameworks
路径
Summary
This is a list of paths to folders containing frameworks to be searched by the compiler for both included or imported header files when compiling C, Objective-C, C++, or Objective-C++, and by the linker for frameworks used by the product. Paths are delimited by whitespace, so any paths with spaces in them must be properly quoted.
Declaration
FRAMEWORK_SEARCH_PATHS
Value Type
Path List
例子:
FRAMEWORK_SEARCH_PATHS = "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/AMap3DMap" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/AMapFoundation" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/AMapSearch" /Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/HaiZiGuoParents/Frameworks /Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/HaiZiGuoParents/Library/ShareSDK /Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/HaiZiGuoParents/Library/ShareSDK/Support/Optional /Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/HaiZiGuoParents/Library/ShareSDK/Support/PlatformSDK/QQSDK /Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/HaiZiGuoParents/Library/ShareSDK/Support/Required /Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/HaiZiGuoParents/Library/AlipaySDK
Header Search Paths
(HEADER_SEARCH_PATHS)编译的时候的头文件搜索路径
Summary
This is a list of paths to folders to be searched by the compiler for included or imported header files when compiling C, Objective-C, C++, or Objective-C++. Paths are delimited by whitespace, so any paths with spaces in them need to be properly quoted.
Declaration
HEADER_SEARCH_PATHS
Value Type
Path List
例子:
HEADER_SEARCH_PATHS = "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/Headers/Public" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/Headers/Public/AFNetworking" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/Headers/Public/AMap3DMap" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/Headers/Public/AMapFoundation" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/Headers/Public/AMapSearch" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/Headers/Public/BlocksKit" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/Headers/Public/MGSwipeTableCell" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/Headers/Public/Masonry" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/Headers/Public/RegexKitLite" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/Headers/Public/SystemServices" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/Headers/Public/Valet" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/Headers/Public/WZLBadge" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/Headers/Public/ZipArchive" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/Headers/Public" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/Headers/Public/AFNetworking" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/Headers/Public/AMap3DMap" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/Headers/Public/AMapFoundation" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/Headers/Public/AMapSearch" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/Headers/Public/Masonry" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/Headers/Public/RegexKitLite" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/Headers/Public/SimpleKeychain" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/Headers/Public/SystemServices" "/Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/Pods/Headers/Public/ZipArchive" /Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/HaiZiGuoParents/IndexVC/HotServices/Others
Library Search Paths
(LIBRARY_SEARCH_PATHS)库搜索路径
Summary
This is a list of paths to folders to be searched by the linker for libraries used by the product. Paths are delimited by whitespace, so any paths with spaces in them need to be properly quoted.
Declaration
LIBRARY_SEARCH_PATHS
Value Type
Path List
例子:
LIBRARY_SEARCH_PATHS = "/Users/ocean/Library/Developer/Xcode/DerivedData/HaiZiGuoParents-awjrjakydlcetycddgxdbiiitwdv/Build/Products/Release-iphoneos/AFNetworking" "/Users/ocean/Library/Developer/Xcode/DerivedData/HaiZiGuoParents-awjrjakydlcetycddgxdbiiitwdv/Build/Products/Release-iphoneos/BlocksKit" "/Users/ocean/Library/Developer/Xcode/DerivedData/HaiZiGuoParents-awjrjakydlcetycddgxdbiiitwdv/Build/Products/Release-iphoneos/MGSwipeTableCell" "/Users/ocean/Library/Developer/Xcode/DerivedData/HaiZiGuoParents-awjrjakydlcetycddgxdbiiitwdv/Build/Products/Release-iphoneos/Masonry" "/Users/ocean/Library/Developer/Xcode/DerivedData/HaiZiGuoParents-awjrjakydlcetycddgxdbiiitwdv/Build/Products/Release-iphoneos/RegexKitLite" "/Users/ocean/Library/Developer/Xcode/DerivedData/HaiZiGuoParents-awjrjakydlcetycddgxdbiiitwdv/Build/Products/Release-iphoneos/SystemServices" "/Users/ocean/Library/Developer/Xcode/DerivedData/HaiZiGuoParents-awjrjakydlcetycddgxdbiiitwdv/Build/Products/Release-iphoneos/Valet" "/Users/ocean/Library/Developer/Xcode/DerivedData/HaiZiGuoParents-awjrjakydlcetycddgxdbiiitwdv/Build/Products/Release-iphoneos/WZLBadge" "/Users/ocean/Library/Developer/Xcode/DerivedData/HaiZiGuoParents-awjrjakydlcetycddgxdbiiitwdv/Build/Products/Release-iphoneos/ZipArchive" /Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/HaiZiGuoParents/Frameworks /Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/HaiZiGuoParents/Library/JpushLib /Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/HaiZiGuoParents/Library/UMAnalytics_Sdk_3.6.6 /Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/HaiZiGuoParents/Library/ShareSDK/Support/PlatformSDK/SinaWeiboSDK /Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/HaiZiGuoParents/Library/ShareSDK/Support/PlatformSDK/WeChatSDK /Users/ocean/Desktop/Demo/MyWay/HaiZiGuoParents/HaiZiGuoParents/HaiZiGuoParents/IndexVC/HotServices/Others
Rez Search Paths
(REZ_SEARCH_PATHS)资源搜索路径
Summary
This is a list of paths to search for files with resource manager resources. Paths are delimited by whitespace, so any paths with spaces in them need to be properly quoted.
Declaration
REZ_SEARCH_PATHS
Value Type
Path List
export REZ_COLLECTOR_DIR=/Users/ocean/Library/Developer/Xcode/DerivedData/ztoExpressClient-axwoigjrsadwcpbvrzeoljxvxnhp/Build/Intermediates.noindex/ztoExpressClient.build/Debug-iphoneos/ztoExpressClient.build/ResourceManagerResources
export REZ_OBJECTS_DIR=/Users/ocean/Library/Developer/Xcode/DerivedData/ztoExpressClient-axwoigjrsadwcpbvrzeoljxvxnhp/Build/Intermediates.noindex/ztoExpressClient.build/Debug-iphoneos/ztoExpressClient.build/ResourceManagerResources/Objects
export REZ_SEARCH_PATHS="/Users/ocean/Library/Developer/Xcode/DerivedData/ztoExpressClient-axwoigjrsadwcpbvrzeoljxvxnhp/Build/Products/Debug-iphoneos "
Sub-Directories to Exclude in Recursive Searches
(EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES)排除的搜索文件类型
Summary
This is a list of `fnmatch()`-style patterns of file or directory names to exclude when performing a recursive search. By default, this is set to `\*.nib \*.lproj \*.framework \*.gch \*.xcode (\*) .DS_Store CVS .svn .git .hg`. Normally, if you override this value you should include the default values via the `$(inherited)` macro.
Declaration
EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES
Value Type
String List
例子:
EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES = *.nib *.lproj *.framework *.gch *.xcode* *.xcassets (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj
Sub-Directories to Inlude in Recursive Searches
(INCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES)Summary
This is a list of `fnmatch()`-style patterns of file or directory names to include when performing a recursive search. By default, this is empty and is only customized when you want to provide exceptions to the list of filename patterns provided in `EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES`.
Declaration
INCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES
Value Type
String List
System Framework Search Paths
(SYSTEM_FRAMEWORK_SEARCH_PATHS)Summary
This is a list of paths to folders containing system frameworks to be searched by the compiler for both included or imported header files when compiling C, Objective-C, C++, or Objective-C++, and by the linker for frameworks used by the product. The order is from highest to lowest precedence. Paths are delimited by whitespace, so any paths with spaces in them need to be properly quoted. This setting is very similar to "Framework Search Paths", except that the search paths are passed to the compiler in a way that suppresses most warnings for headers found in system search paths. If the compiler doesn't support the concept of system framework search paths, then the search paths are appended to any existing framework search paths defined in "Framework Search Paths".
Declaration
SYSTEM_FRAMEWORK_SEARCH_PATHS
Value Type
Path List
System Header Search Paths
(SYSTEM_HEADER_SEARCH_PATHS)Summary
This is a list of paths to folders to be searched by the compiler for included or imported system header files when compiling C, Objective-C, C++, or Objective-C++. The order is from highest to lowest precedence. Paths are delimited by whitespace, so any paths with spaces in them need to be properly quoted. This setting is very similar to "Header Search Paths", except that headers are passed to the compiler in a way that suppresses most warnings for headers found in system search paths. If the compiler doesn't support the concept of system header search paths, then the search paths are appended to any existing header search paths defined in "Header Search Paths".
Declaration
SYSTEM_HEADER_SEARCH_PATHS
Value Type
Path List
User Header Maps
(USE_HEADERMAP)会生成 .hmap
文件
Summary
Enable the use of *Header Maps*, which provide the compiler with a mapping from textual header names to their locations, bypassing the normal compiler header search path mechanisms. This allows source code to include headers from various locations in the file system without needing to update the header search path build settings.
Declaration
USE_HEADERMAP
Value Type
Boolean
例子:
USE_HEADERMAP = YES
User Header Search Paths
(USER_HEADER_SEARCH_PATHS)Summary
This is a list of paths to folders to be searched by the compiler for included or imported user header files (those headers listed in quotes) when compiling C, Objective-C, C++, or Objective-C++. Paths are delimited by whitespace, so any paths with spaces in them need to be properly quoted. See `ALWAYS_SEARCH_USER_PATHS` for more details on how this setting is used. If the compiler doesn't support the concept of user headers, then the search paths are prepended to the any existing header search paths defined in `HEADER_SEARCH_PATHS`.
Declaration
USER_HEADER_SEARCH_PATHS
Value Type
Path List
Signing
Code Signing Entitlements
(CODE_SIGN_ENTITLEMENTS)Summary
The path to a file specifying code-signing entitlements.
Declaration
CODE_SIGN_ENTITLEMENTS
Value Type
String
例子:
CODE_SIGN_ENTITLEMENTS = HaiZiGuoParents/HaiZiGuoParents.entitlements
文件打开如下:
aps-environment
development
Code Signing Identity
(CODE_SIGN_IDENTITY)证书校验
Summary
The name, also known as the *common name*, of a valid code-signing certificate in a keychain within your keychain path. A missing or invalid certificate will cause a build error.
Declaration
CODE_SIGN_IDENTITY
Value Type
Code Signing Identity
例子:
CODE_SIGN_IDENTITY = iPhone Developer
Code Signing Inject Base Entitlements
(CODE_SIGN_INJECT_BASE_ENTITLEMENTS)Summary
Automatically inject entitlements from the platform's BaseEntitlements.plist into the code signatures of executables.
Declaration
CODE_SIGN_INJECT_BASE_ENTITLEMENTS
Value Type
Boolean
例子:
CODE_SIGN_INJECT_BASE_ENTITLEMENTS = YES
Code Signing Style
(CODE_SIGN_STYLE)取值 Automatic
Manual
Summary
This setting specifies the method used to acquire and locate signing assets. Choose `Automatic` to let Xcode automatically create and update profiles, app IDs, and certificates. Choose `Manual` to create and update these yourself on the developer website.
Declaration
CODE_SIGN_STYLE
Value Type
Code Sign Style
Development Team
(DEVELOPMENT_TEAM)Summary
The team ID of a development team to use for signing certificates and provisioning profiles.
Declaration
DEVELOPMENT_TEAM
Value Type
Development Team
例子:
DEVELOPMENT_TEAM = D94N38GZR8
Other Code Signing Flags
(OTHER_CODE_SIGN_FLAGS)Summary
A list of additional options to pass to `codesign(1)`.
Declaration
OTHER_CODE_SIGN_FLAGS
Value Type
String List
Provisioning Profile
(PROVISIONING_PROFILE_SPECIFIER)Summary
Must contain a profile name (or UUID). A missing or invalid profile will cause a build error. Use in conjunction with [DEVELOPMENT_TEAM] to fully specify provisioning profile.
Declaration
PROVISIONING_PROFILE_SPECIFIER
Value Type
Provisioning Profile Specifier
Testing
Text-Based API
Versioning
Asset Catalog Compiler - Options
Asset Catalog App Icon Set Name
(ASSETCATALOG_COMPILER_APPICON_NAME)App Icon
资源集合,最终会按照规则拷贝到 .app/Info.plist
文件中;默认值是 AppIcon
Summary
Name of an asset catalog app icon set whose contents will be merged into the `Info.plist`.
Declaration
ASSETCATALOG_COMPILER_APPICON_NAME
Value Type
String
例子:
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
Asset Catalog Launch Image Set Name
(ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME)Launch Image
资源集合,最终会按照规则拷贝到 .app/Info.plist
文件中;默认值是 LaunchImage
summary
Name of an asset catalog launch image set whose contents will be merged into the `Info.plist`.
Declaration
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME
Value Type
String
例子:
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage
Asset Catalog Other Flags
(ASSETCATALOG_OTHER_FLAGS)Summary
Pass additional flags through to the asset catalog compiler.
Declaration
ASSETCATALOG_OTHER_FLAGS
Value Type
String List
Build Active Resources Only
(ENABLE_ONLY_ACTIVE_RESOURCES)编译的时候,针对单个设备,只编译对应的资源文件,比如,视网膜屏幕,就会省略 1x
资源;默认值是 YES
Summary
Omit inapplicable resources when building for a single device. For example, when building for a device with a Retina display, exclude 1x resources.
Declaration
ENABLE_ONLY_ACTIVE_RESOURCES
Value Type
Boolean
Enable Incremental Distill
(ENABLE_INCREMENTAL_DISTILL)默认值为 NO
Summary
Enabled the incremental `distill` option in the asset catalog compiler. This feature is experimental and should only be enabled with caution.
Declaration
ENABLE_INCREMENTAL_DISTILL
Value Type
Boolean
Optimization
(ASSETCATALOG_COMPILER_OPTIMIZATION)time
: 加快访问速度space
: 更小的体积Summary
With no value, the compiler uses the default optimization. You can also specify `time` to optimize for speed of access or `space` to optimize for a smaller compiled asset catalogs.
Declaration
ASSETCATALOG_COMPILER_OPTIMIZATION
Value Type
Enumeration (String)
Show Notices
(ASSETCATALOG_NOTICES)默认 YES
Summary
Show notices encountered during the compilation of asset catalogs.
Declaration
ASSETCATALOG_NOTICES
Value Type
Boolean
Show Warnings
(ASSETCATALOG_WARNINGS)Summary
Show warnings encountered during the compilation of asset catalogs.
Declaration
ASSETCATALOG_WARNINGS
Value Type
Boolean
Sticker Pack Identifier Prefix
默认值 $(PRODUCT_BUNDLE_IDENTIFIER).sticker-pack.
Summary
Sticker Packs in the asset catalog may optionally specify an identifier. If they do not, their name will be prefixed by this value to form an automatically generated identifier.
Declaration
ASSETCATALOG_COMPILER_STICKER_PACK_IDENTIFIER_PREFIX
Value Type
String
Compress PNG Files - Packaging
Compress PNG Files
(COMPRESS_PNG_FILES)是否压缩PNG
文件,默认是 YES
Summary
If enabled, PNG resource files are compressed as they are copied.
Declaration
COMPRESS_PNG_FILES
Value Type
Boolean
COMPRESS_PNG_FILES=YES
PNG
文件中的文本块形式的元数据将被删除,以减少它们在磁盘上的占用空间。
Summary
Metadata in the form of text chunks in PNG files will be removed to reduce their footprint on disk.
Declaration
STRIP_PNG_TEXT
Value Type
Boolean
Interface Build Storyboard Compiler - Options
Auto-Activate Custom Fonts
(IBSC_COMPILER_AUTO_ACTIVATE_CUSTOM_FONTS)默认 YES
Summary
Instructs the Storyboard compiler to add custom fonts to the application's `Info.plist` that will cause the fonts to activate upon application launch.
Declaration
IBSC_COMPILER_AUTO_ACTIVATE_CUSTOM_FONTS
Value Type
Boolean
Default Module
(IBSC_MODULE)默认 $(PRODUCT_MODULE_NAME)
为没有特定模块名引用的Swift类定义模块名。
Summary
Defines the module name for Swift classes referenced without a specific module name.
Declaration
IBSC_MODULE
Value Type
String
Flatten Compiled Storyboard FIles
YES
: 生成的 Storyboard
不能够再次编辑NO
: 生成的 Storyboard
可以再次编辑默认 YES
Summary
Compiles a Storyboard file into flattened (non-wrapper) Storyboard file. After flattening, the resulting Storyboard is more compact but no longer editable by Interface Builder. When this option is disabled, the resulting Storyboard file remains editable in Interface Builder.
Declaration
IBSC_FLATTEN_NIBS
Value Type
Boolean
Other Storyboard Compiler Flags
(IBSC_OTHER_FLAGS)Summary
A list of additional flags to pass to the Interface Builder Compiler. Use this setting if Xcode does not already provide UI for a particular Interface Builder Compiler flag.
Declaration
IBSC_OTHER_FLAGS
Value Type
String List
Show Errors
(IBSC_ERRORS)默认 YES
Summary
Show errors encountered during the compilation of Storyboard files.
Declaration
IBSC_ERRORS
Value Type
Boolean
Show Notices
(IBSC_NOTICES)默认 YES
Summary
Show notices encountered during the compilation of Storyboard files.
Declaration
IBSC_NOTICES
Value Type
Boolean
Show Warnings
(IBSC_WARNINGS)默认 YES
Summary
Show warnings encountered during the compilation of Storyboard files.
Declaration
IBSC_WARNINGS
Value Type
Boolean
User-Defined
用户定义的内容
使用 cocoapod 进行的用户定义的内容