文章目录
- 基本概念
- `Build Settings`
-
- `Architectures` 架构
- `Assets`
- `Build Locations`
- `Build Options`
-
- `Always Embed Swift Standard Libaries` (ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES)
- `Build Librayies for Distribution` (BUILD_LIBRARY_FOR_DISTRIBUTION)
- `Build Variants` (BUILD_VARIANTS)
- `Compiler for C/C++/Objective-C` (GCC_VERSION)
- `Debug Information Format` (DEBUG_INFORMATION_FORMAT)
- `Enable Bitcode` (ENABLE_BITCODE)
- `Enable Index-While-Building Functionality` (COMPILER_INDEX_STORE_ENABLE)
- `Enable Previews` (ENABLE_PREVIEWS)
- `Enable Testability` (ENABLE_TESTABILITY)
- `Enable Testing Search Paths` (ENABLE_TESTING_SEARCH_PATHS)
- `Excluded Source File Names` (EXCLUDED_SOURCE_FILE_NAMES)
- `Included Source File Names` (INCLUDED_SOURCE_FILE_NAMES)
- `Generate Profiling Code` (GENERATE_PROFILING_CODE)
- `Precompiled Header Uses Files From Build Direcotry` (PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR)
- `Require Only App-Extension-Safe API` (APPLICATION_EXTENSION_API_ONLY)
- `Scan All Source Files for Includes` (SCAN_ALL_SOURCE_FILES_FOR_INCLUDES)
- `Validate Built Product` (VALIDATE_PRODUCT)
- `Validate Workspace` (VALIDATE_WORKSPACE)
- `Validate Workspace - Ignored Frameworks` (VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS)
- `Deployment` 调度,部署
-
- `Deployment Location` (DEPLOYMENT_LOCATION)
- `Deployment Postprocessing` (DEPLOYMENT_POSTPROCESSING)
- `Additional Strip Flags` (STRIPFLAGS)
- `Strip Debug Symbols During Copy` (COPY_PHASE_STRIP)
- `Strip Linked Product` (STRIP_INSTALLED_PRODUCT)
- `Strip Style` (STRIP_STYLE)
- `Strip Swift Symbols` (STRIP_SWIFT_SYMBOLS)
- `Alternate Install Group` (ALTERNATE_GROUP)
- `Alternate Install Owner` (ALTERNATE_OWNER)
- `Alternate Install Permissions` (ALTERNATE_MODE)
- `Alternate Permissions Files` (ALTERNATE_PERMISSIONS_FILES)
- `Install Group` (INSTALL_GROUP)
- `Install Owner` (INSTALL_OWNER)
- `Install Permissions` (INSTALL_MODE_FLAG)
- `Installation Build Products Location` (DSTROOT)
- `Installation Directory` (INSTALL_PATH)
- `Skip Install` (SKIP_INSTALL)
- `Targeted Device Family` (TARGETED_DEVICE_FAMILY)
- `Resources Targeted Device Family` (RESOURCES_TARGETED_DEVICE_FAMILY)
- `iOS Deployment Target` (IPHONEOS_DEPLOYMENT_TARGET)
- `macOS Deployment Target` (MACOSX_DEPLOYMENT_TARGET)
- `tvOS Deployment Target`
- `watchOS Deployment Target`
- `Headers`
- `Kernel Module` 内核
- `Linking`
-
- `Bundle Loader` (BUNDLE_LOADER)
- `Compatiblility Version` (DYLIB_COMPATIBILITY_VERSION)
- `Current Library Version` (DYLIB_CURRENT_VERSION)
- `Dead Code Stripping` (DEAD_CODE_STRIPPING)
- `Display Magnled Names` (LINKER_DISPLAYS_MANGLED_NAMES)
- `Dont't Dead-Strip Inits and Terms` (PRESERVE_DEAD_CODE_INITS_AND_TERMS)
- `Dynaminc Library Install Name` (LD_DYLIB_INSTALL_NAME)
- `Dynaminc Library Install Name Base` (DYLIB_INSTALL_NAME_BASE)
- `Exported Symbols File` (EXPORTED_SYMBOLS_FILE)
- `Generate Position-Dependent Executable` (LD_NO_PIE)
- `Initialization Routine` (INIT_ROUTINE)
- `Link With Standard Libraries` (LINK_WITH_STANDARD_LIBRARIES)
- `Mach-O Type` (MACH_O_TYPE)
- `Order File`
- `Other Libraries Flags` (OTHER_LIBTOOLFLAGS)
- `Other Linker Flags` (OTHER_LDFLAGS)
- `Path to Link Map File` (LD_MAP_FILE_PATH)
- `Perform Single-Object Prelink` (GENERATE_MASTER_OBJECT_FILE)
- `Prelink libraries` (PRELINK_LIBS)
- `Preserve Private External Symbols`
- `Quote Linker Arguments` (LD_QUOTE_LINKER_ARGUMENTS_FOR_COMPILER_DRIVER)
- `Re-Exported Framework Names` (REEXPORTED_FRAMEWORK_NAMES)
- `Re-Exported Library Names` (REEXPORTED_LIBRARY_NAMES)
- `Re-Exported Library Paths` (REEXPORTED_LIBRARY_PATHS)
- `Runpath Search Paths`
- `Separately Edit Symbols` (SEPARATE_SYMBOL_EDIT)
- `Single-Object Prelink Flags` (PRELINK_FLAGS)
- `Symbol Ordering Flags` (SECTORDER_FLAGS)
- `Unexported Symbols Files` (UNEXPORTED_SYMBOLS_FILE)
- `Warnings Linker Flags` (WARNING_LDFLAGS)
- `Write Link Map File` (LD_GENERATE_MAP_FILE)
- `Localization` 本地化
- `Packaging`
-
- `Convert Copied Files` (APPLY_RULES_IN_COPY_FILES)
- `Property List Output Encoding` (PLIST_FILE_OUTPUT_FORMAT)
- `Strings File Output Encoding` (STRINGS_FILE_OUTPUT_ENCODING)
- `Create Info.plist Section In Binary` (CREATE_INFOPLIST_SECTION_IN_BINARY)
- `Info.plist` (INFOPLIST_FILE)
- `Preprocess Info.plist File` (INFOPLIST_PREPROCESS)
- `Info.plist Other Preprocessor Flags` (INFOPLIST_OTHER_PREPROCESSOR_FLAGS)
- `Info.plist Other Preprocessor Definitions` (INFOPLIST_PREPROCESSOR_DEFINITIONS)
- `Info.plist Other Preprocessor Prefix File` (INFOPLIST_PREFIX_HEADER)
- `Info.plist Output Encoding` (INFOPLIST_OUTPUT_FORMAT)
- `Expand Build Settings In Info.plist File` (INFOPLIST_EXPAND_BUILD_SETTINGS)
- `Defins Module` (DEFINES_MODULE)
- `Module Map File` (MODULEMAP_FILE)
- `Private Module Map File` (MODULEMAP_PRIVATE_FILE)
- `Framework Version` (FRAMEWORK_VERSION)
- `Executable Extension` (EXECUTABLE_EXTENSION)
- `Executable Prefix` (EXECUTABLE_PREFIX)
- `Warpper Extension` (WRAPPER_EXTENSION)
- `Product Name` (PRODUCT_NAME)
- `Product Module Name` (PRODUCT_MODULE_NAME)
- `Product Bundle Identifier` (PRODUCT_BUNDLE_IDENTIFIER)
- `Public Headers Folder Path` (PUBLIC_HEADERS_FOLDER_PATH)
- `Private Headers Folder Path` (PRIVATE_HEADERS_FOLDER_PATH)
- `Preserve HFS Data` (COPYING_PRESERVES_HFS_DATA)
- `Force Package Info Generation` (GENERATE_PKGINFO_FILE)
- `Search Paths`
-
- `Always Search User Paths (Deprecated)` 废除不使用
- `Framework Search Paths` (FRAMEWORK_SEARCH_PATHS)
- `Header Search Paths` (HEADER_SEARCH_PATHS)
- `Library Search Paths` (LIBRARY_SEARCH_PATHS)
- `Rez Search Paths` (REZ_SEARCH_PATHS)
- `Sub-Directories to Exclude in Recursive Searches` (EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES)
- `Sub-Directories to Inlude in Recursive Searches` (INCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES)
- `System Framework Search Paths` (SYSTEM_FRAMEWORK_SEARCH_PATHS)
- `System Header Search Paths` (SYSTEM_HEADER_SEARCH_PATHS)
- `User Header Maps` (USE_HEADERMAP)
- `User Header Search Paths` (USER_HEADER_SEARCH_PATHS)
- `Signing`
-
- `Code Signing Entitlements` (CODE_SIGN_ENTITLEMENTS)
- `Code Signing Identity` (CODE_SIGN_IDENTITY)
- `Code Signing Inject Base Entitlements` (CODE_SIGN_INJECT_BASE_ENTITLEMENTS)
- `Code Signing Style` (CODE_SIGN_STYLE)
- `Development Team` (DEVELOPMENT_TEAM)
- `Other Code Signing Flags` (OTHER_CODE_SIGN_FLAGS)
- `Provisioning Profile` (PROVISIONING_PROFILE_SPECIFIER)
- `Testing`
- `Text-Based API`
- `Versioning`
- `Asset Catalog Compiler - Options`
-
- `Asset Catalog App Icon Set Name` (ASSETCATALOG_COMPILER_APPICON_NAME)
- `Asset Catalog Launch Image Set Name` (ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME)
- `Asset Catalog Other Flags` (ASSETCATALOG_OTHER_FLAGS)
- `Build Active Resources Only` (ENABLE_ONLY_ACTIVE_RESOURCES)
- `Enable Incremental Distill` (ENABLE_INCREMENTAL_DISTILL)
- `Optimization` (ASSETCATALOG_COMPILER_OPTIMIZATION)
- `Show Notices` (ASSETCATALOG_NOTICES)
- `Show Warnings` (ASSETCATALOG_WARNINGS)
- `Sticker Pack Identifier Prefix`
- `Compress PNG Files - Packaging`
- `Interface Build Storyboard Compiler - Options`
- `User-Defined`
基本概念
最终取值
从高到低依次如下:
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
相关
文章列表:
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)
- EXCLUDED_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 *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