跳到正文

← 全部工具

面向 iOS 和 Mac 开发者的免费工具

Xcode 构建设置速查与 .xcconfig 检查

按名称、Xcode 里显示的标题或 Apple 说明里的词查找任何构建设置,查看它的类型和 Xcode 接受的值。也可以粘贴 .xcconfig 文件,找出会让 Xcode 忽略整个文件的行、Xcode 读到的值和你写的不一样的地方,以及根本不存在的设置。所有内容都不会上传。

设置项和说明取自 Apple 的 Build settings reference;类型和允许的值取自 Xcode 27.1 自带的设置定义;核对于 2026-10-31。

共 0 项,显示 0 项

ACTION

Active Build Action

类型
字符串
A string identifying the build system action being performed.
Apple 页面

ADDITIONAL_SDKS

Additional SDKs

类型
字符串列表
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.
Apple 页面

ALLOW_TARGET_PLATFORM_SPECIALIZATION

Allow Multi-Platform Builds

类型
布尔值(YES 或 NO)
默认值
NO
If enabled, allows targets to build multiple times within a single build operation. Targets will build for the platform of the active run destination, as well as the platforms of any targets which depend on them.
Apple 页面

ALTERNATE_GROUP

Alternate Install Group

类型
字符串
默认值
$(INSTALL_GROUP)
The group name or gid for the files listed under the ALTERNATE_PERMISSIONS_FILES setting.
Apple 页面

ALTERNATE_MODE

Alternate Install Permissions

类型
字符串
默认值
$(INSTALL_MODE_FLAG)
Permissions used for the files listed under the ALTERNATE_PERMISSIONS_FILES setting.
Apple 页面

ALTERNATE_OWNER

Alternate Install Owner

类型
字符串
默认值
$(INSTALL_OWNER)
The owner name or uid for the files listed under the ALTERNATE_PERMISSIONS_FILES setting.
Apple 页面

ALTERNATIVE_DISTRIBUTION_WEB

Alternative Distribution - Web

类型
布尔值(YES 或 NO)
默认值
NO
Enable overriding your app’s distributor identifier for web distribution when running from Xcode.
Apple 页面

ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES

Always Embed Swift Standard Libraries

类型
布尔值(YES 或 NO)
默认值
$(EMBEDDED_CONTENT_CONTAINS_SWIFT)
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.
Apple 页面

ALWAYS_SEARCH_USER_PATHS

Always Search User Paths (Deprecated)

类型
布尔值(YES 或 NO)
默认值
YES
This setting is deprecated as of Xcode 8.3 and may not be supported in future versions. It is recommended that you disable the setting. If enabled, both #include <header.h>-style and #include "header.h"-style directives search the paths in USER_HEADER_SEARCH_PATHS before HEADER_SEARCH_PATHS. As a consequence, user headers, such as your own String.h header, have precedence over system headers when using #include <header.h>. This is done using the -iquote flag for the paths provided in USER_HEADER_SEARCH_PATHS. If disabled and your compiler fully supports separate user paths, user headers are only accessible with #include "header.h"-style preprocessor directives. For backwards compatibility reasons, this setting is enabled by default. Disabling it is strongly recommended.
Apple 页面

APPLICATION_EXTENSION_API_ONLY

Require Only App-Extension-Safe API

类型
布尔值(YES 或 NO)
默认值
NO
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.
Apple 页面

APPLY_RULES_IN_COPY_FILES

Convert Copied Files

类型
布尔值(YES 或 NO)
默认值
NO
Enabling this setting will cause files in the target’s Copy Files build phases to be processed by build rules. For example, property list files (.plist) and strings files will be converted as specified by PLIST_FILE_OUTPUT_FORMAT and STRINGS_FILE_OUTPUT_ENCODING, respectively.
Apple 页面

APPLY_RULES_IN_COPY_HEADERS

Process Header Files

类型
布尔值(YES 或 NO)
默认值
NO
Enabling this setting will cause all Public and Private headers in the target’s Copy Headers build phase to be processed by build rules. This allows custom build rules to be defined to process these headers. Custom script rules can define their outputs relative to HEADER_OUTPUT_DIR, which will be provided to that script, taking the header visibility into account. The scripts are also passed SCRIPT_HEADER_VISIBILITY (“public” or “private”). Files that should not be processed by build rules may need to be moved to a Copy Files build phase when this setting is enabled.
Apple 页面

ARCHS

Architectures

类型
字符串列表
默认值
$(ARCHS_STANDARD)
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.
Apple 页面

ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES

Alternate App Icon Sets

类型
字符串列表
A set of additional app icon set names to include as in the built product. The icons will be available at runtime for use as alternate app icons. This is an alternative to --include-all-app-icons providing more detailed control.
Apple 页面

ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS

Include All App Icon Assets

类型
布尔值(YES 或 NO)
默认值
NO
When true, all app icon assets from the target’s Asset Catalogs will be included in the built product, making the available at runtime for use as alternate app icons. When false, only the primary app icon will be included in the built product.
Apple 页面

ASSETCATALOG_COMPILER_INCLUDE_INFOPLIST_LOCALIZATIONS

Include Asset Localizations in Info.plist

类型
布尔值(YES 或 NO)
默认值
YES
When enabled, includes the localization information of the selected assets in the generated partial Info.plist file under the CFBundleLocalizations key. This will allow the assets to be used at runtime in the absence of a corresponding lproj directory in the bundle.
Apple 页面

ASSETCATALOG_COMPILER_LEADERBOARD_IDENTIFIER_PREFIX

Leaderboard Identifier Prefix

类型
字符串
默认值
$(PRODUCT_NAME:identifier).game-center.leaderboard.
Leaderboards in the asset catalog may optionally specify a Game Center identifier. If they do not, their name will be prefixed by this value to form an automatically generated identifier.
Apple 页面

ASSETCATALOG_COMPILER_LEADERBOARD_SET_IDENTIFIER_PREFIX

Leaderboard Set Identifier Prefix

类型
字符串
默认值
$(PRODUCT_NAME:identifier).game-center.leaderboard-set.
Leaderboard sets in the asset catalog may optionally specify a Game Center identifier. If they do not, their name will be prefixed by this value to form an automatically generated identifier.
Apple 页面

ASSETCATALOG_COMPILER_OPTIMIZATION

Optimization

类型
列出的值之一
可选值
space · time
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.
Apple 页面

ASSETCATALOG_COMPILER_SKIP_APP_STORE_DEPLOYMENT

Skip App Store Deployment

类型
布尔值(YES 或 NO)
Whether to perform App Store-specific behaviors such as validations. For example, building for an iOS or watchOS app will warn if a 1024 App Store icon is not present, but only when compiling for App Store deployment.
Apple 页面

ASSETCATALOG_COMPILER_STANDALONE_ICON_BEHAVIOR

Standalone Icon File Behavior

类型
列出的值之一
可选值
all · default · none
默认值
default
Controls whether loose PNG or ICNS files are created for the primary app icon, in addition to including the content in the Assets.car file. By default, a small subset of sizes are included as loose files, allowing external management tools to display a representative icon without reading the CAR file. This can be set to ‘all’ or ‘none’ to include more or fewer icon sizes as loose files.
Apple 页面

ASSET_PACK_MANIFEST_URL_PREFIX

Asset Pack Manifest URL Prefix

类型
字符串
If set to anything other than the empty string, every URL in the AssetPackManifest.plist file will consist of this string with the name of the asset pack appended. If not set, the URLs in the AssetPackManifest.plist will be formed as appropriate for the build location of the asset packs. The prefix string is not escaped or quoted in any way, so any necessary escaping must be part of the URL string. This setting affects only URLs in the AssetPackManifest.plist file — it does not affect where asset packs are built in the local file system.
Apple 页面

AUTOMATION_APPLE_EVENTS

Apple Events

类型
布尔值(YES 或 NO)
默认值
NO
A Boolean value that indicates whether the app may prompt the user for permission to send Apple events to other apps.
Apple 页面

BUILD_LIBRARY_FOR_DISTRIBUTION

Build Libraries for Distribution

类型
布尔值(YES 或 NO)
默认值
NO
Ensures that your libraries are built for distribution. For Swift, this enables support for library evolution and generation of a module interface file.
Apple 页面

BUILD_VARIANTS

Build Variants

类型
字符串列表
默认值
normal
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.
Apple 页面

BUILT_PRODUCTS_DIR

BUILT_PRODUCTS_DIR

类型
路径
默认值
$(CONFIGURATION_BUILD_DIR)
Identifies the directory under which all the product’s files can be found. This directory contains either product files or symbolic links to them. Run Script build phases can use the value of this build setting as a convenient way to refer to the product files built by one or more targets even when these files are scattered throughout a directory hierarchy (for example, when DEPLOYMENT_LOCATION is set to YES.
Apple 页面

BUNDLE_LOADER

Bundle Loader

类型
路径
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.
Apple 页面

CLANG_ADDRESS_SANITIZER_CONTAINER_OVERFLOW

Enable C++ Container Overflow Checks

类型
布尔值(YES 或 NO)
默认值
NO
Check for C++ container overflow when Address Sanitizer is enabled. This check requires the entire application to be built with Address Sanitizer. If not, it may report false positives.
Apple 页面

CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES

Allow Non-modular Includes In Framework Modules

类型
布尔值(YES 或 NO)
默认值
NO
Enabling this setting allows non-modular includes to be used from within framework modules. This is inherently unsafe, as such headers might cause duplicate definitions when used by any client that imports both the framework and the non-modular includes.
Apple 页面

CLANG_ANALYZER_GCD

Misuse of Grand Central Dispatch

类型
布尔值(YES 或 NO)
默认值
YES
Check for misuses of the Grand Central Dispatch API.
Apple 页面

CLANG_ANALYZER_GCD_PERFORMANCE

Performance Anti-Patterns with Grand Central Dispatch

类型
列出的值之一
可选值
NO · YES
默认值
NO
Check for Grand Central Dispatch idioms that may lead to poor performance.
Apple 页面

CLANG_ANALYZER_NONNULL

Misuse of ‘nonnull’

类型
列出的值之一
可选值
NO · YES · YES_NONAGGRESSIVE
默认值
YES_NONAGGRESSIVE
Check for misuses of nonnull parameter and return types.
Apple 页面

CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION

Suspicious Conversions of NSNumber and CFNumberRef

类型
列出的值之一
可选值
NO · YES · YES_AGGRESSIVE
默认值
YES
Warn when a number object, such as an instance of NSNumber, CFNumberRef, OSNumber, or OSBoolean is compared or converted to a primitive value instead of another object.
Apple 页面

CLANG_ANALYZER_OBJC_COLLECTIONS

Misuse of Collections API

类型
布尔值(YES 或 NO)
默认值
YES
Warn if CF collections are created with non-pointer-size values. Check if NS collections are initialized with non-Objective-C type elements.
Apple 页面

CLANG_ANALYZER_OBJC_NSCFERROR

Improper Handling of CFError and NSError

类型
布尔值(YES 或 NO)
默认值
YES
Warn if functions accepting CFErrorRef or NSError cannot indicate that an error occurred.
Apple 页面

CLANG_ANALYZER_OBJC_SELF_INIT

Violation of ‘self = [super init]’ Rule

类型
布尔值(YES 或 NO)
默认值
YES
Check that super init is properly called within an Objective-C initialization method.
Apple 页面

CLANG_ANALYZER_OSOBJECT_C_STYLE_CAST

C-style Downcasts of IOKit Objects

类型
布尔值(YES 或 NO)
默认值
NO
Warn when a C-style cast is used for downcasting a pointer to an OSObject. RTTI-aware casts (OSRequiredCast, OSDynamicCast) are more secure and should be used instead of C-style casts in order to avoid potential type confusion attacks.
Apple 页面

CLANG_ANALYZER_SECURITY_INSECUREAPI_MKSTEMP

Use of ‘mktemp’ or Predictable ‘mktemps’

类型
布尔值(YES 或 NO)
默认值
YES
Warn on uses of mktemp, which produces predictable temporary files. It is obsoleted by mktemps. Warn when mkstemp is passed fewer than 6 X’s in the format string.
Apple 页面

CLANG_ANALYZER_USE_AFTER_MOVE

Use-After-Move Errors in C++

类型
列出的值之一
可选值
NO · YES · YES_AGGRESSIVE
默认值
YES_AGGRESSIVE
Warn when a C++ object is used after it has been moved from.
Apple 页面

CLANG_CXX_LANGUAGE_STANDARD

C++ Language Dialect

类型
列出的值之一
可选值
c++0x · c++14 · c++17 · c++20 · c++23 · c++98 · compiler-default · gnu++0x · gnu++14 · gnu++17 · gnu++20 · gnu++23 · gnu++98
默认值
compiler-default
Choose a standard or non-standard C++ language dialect. Options include: • C++98: Accept ISO C++ 1998 with amendments, but not GNU extensions. [-std=c++98] • GNU++98: Accept ISO C++ 1998 with amendments and GNU extensions. [-std=gnu++98] • C++11: Accept the ISO C++ 2011 standard with amendments, but not GNU extensions. [-std=c++11] • GNU++11: Accept the ISO C++ 2011 standard with amendments and GNU extensions. [-std=gnu++11] • C++14: Accept the ISO C++ 2014 standard with amendments, but not GNU extensions. [-std=c++14] • GNU++14: Accept the ISO C++ 2014 standard with amendments and GNU extensions. [-std=gnu++14] • C++17: Accept the ISO C++ 2017 standard with amendments, but not GNU extensions. [-std=c++17] • GNU++17: Accept the ISO C++ 2017 standard with amendments and GNU extensions. [-std=gnu++17] • C++20: Accept the ISO C++ 2020 standard with amendments, but not GNU extensions. [-std=c++20] • GNU++20: Accept the ISO C++ 2020 standard with amendments and GNU extensions. [-std=gnu++20] • C++23: Accept the ISO C++ 2023 standard with amendments, but not GNU extensions. [-std=c++23] • GNU++23: Accept the ISO C++ 2023 standard with amendments and GNU extensions. [-std=gnu++23] • Compiler Default: Tells the compiler to use its default C++ language dialect. This is normally the best choice unless you have specific needs. (Currently equivalent to GNU++98.)
Apple 页面

CLANG_CXX_STANDARD_LIBRARY_HARDENING

Enable C++ Standard Library Hardening

类型
列出的值之一
可选值
debug · extensive · fast · none
默认值
$(__LIBRARY_HARDENING_DEFAULT_VALUE)
Enable hardening in the C++ standard library. Available values: • No: No runtime hardening checks. • Yes (fast): Enable low-overhead security-critical checks at runtime. • Yes (extensive): Enable low-overhead checks at runtime to find security issues as well as general logic errors. • Yes (debug): Enable all available checks in the library, including high-overhead heuristic checks and internal assertions. This mode should not be used in production. This setting defines the value of the _LIBCPP_HARDENING_MODE preprocessor macro.
Apple 页面

CLANG_DEBUG_INFORMATION_LEVEL

Debug Information Level

类型
列出的值之一
可选值
default · line-tables-only
默认值
default
Toggles the amount of debug information emitted when debug symbols are enabled. This can impact the size of the generated debug information, which may matter in some cases for large projects, such as when using LTO.
Apple 页面

CLANG_ENABLE_CPLUSPLUS_TYPED_ALLOCATOR_SUPPORT

Enable Typed Allocator in C++

类型
列出的值之一
可选值
NO · YES · compiler-default
默认值
$(_CLANG_ENABLE_TYPED_ALLOCATOR_SUPPORT_DEFAULT)
Enables compiler rewriting of allocation calls in C++ to provide type information to the allocator. Mitigates use-after-free security vulnerabilities.
Apple 页面

CLANG_ENABLE_C_TYPED_ALLOCATOR_SUPPORT

Enable Typed Allocator in C

类型
列出的值之一
可选值
NO · YES · compiler-default
默认值
$(_CLANG_ENABLE_TYPED_ALLOCATOR_SUPPORT_DEFAULT)
Enables compiler rewriting of allocation calls in C to provide type information to the allocator. Mitigates use-after-free security vulnerabilities.
Apple 页面

CLANG_ENABLE_MODULES

Enable Modules (C and Objective-C)

类型
布尔值(YES 或 NO)
默认值
NO
Enables the use of modules for system APIs. System headers are imported as semantic modules instead of raw headers. This can result in faster builds and project indexing.
Apple 页面

CLANG_ENABLE_MODULE_DEBUGGING

Enable Clang Module Debugging

类型
布尔值(YES 或 NO)
默认值
YES
When this setting is enabled, clang will use the shared debug info available in clang modules and precompiled headers. This results in smaller build artifacts, faster compile times, and more complete debug info. This setting should only be disabled when building static libraries with debug info for distribution.
Apple 页面

CLANG_ENABLE_OBJC_ARC

Objective-C Automatic Reference Counting

类型
布尔值(YES 或 NO)
默认值
NO
Compiles reference-counted Objective-C code to use Automatic Reference Counting. Code compiled using automated reference counting is compatible with other code (such as frameworks) compiled using either manual reference counting (for example, traditional retain and release messages) or automated reference counting. [-fobjc-arc]
Apple 页面

CLANG_ENABLE_OBJC_ARC_EXCEPTIONS

Enable Objective-C ARC Exceptions

类型
布尔值(YES 或 NO)
默认值
NO
This setting causes clang to use exception-handler-safe code when synthesizing retains and releases when using ARC. Without this, ARC is not exception-safe. Only applies to Objective-C. [-fobjc-arc-exceptions]
Apple 页面

CLANG_ENABLE_OBJC_WEAK

Weak References in Manual Retain Release

类型
布尔值(YES 或 NO)
默认值
NO
Compiles Objective-C code to enable weak references for code compiled with manual retain release (MRR) semantics.
Apple 页面

CLANG_ENABLE_STACK_ZERO_INIT

Enable Stack Zero Initialization

类型
布尔值(YES 或 NO)
默认值
$(ENABLE_ENHANCED_SECURITY)
Automatically initializes stack variables to zero as a security protection.
Apple 页面

CLANG_MODULES_DISABLE_PRIVATE_WARNING

Disable Private Modules Warnings

类型
布尔值(YES 或 NO)
默认值
NO
Disable warnings related to the recommended use of private module naming. This only makes sense when support for modules is enabled.
Apple 页面

CLANG_OPTIMIZATION_PROFILE_FILE

Optimization Profile File

类型
路径
默认值
$(SRCROOT)/OptimizationProfiles/$(PROJECT_NAME).profdata
The path to the file of the profile data to use when CLANG_USE_OPTIMIZATION_PROFILE is enabled.
Apple 页面

CLANG_STATIC_ANALYZER_MODE

Mode of Analysis for ‘Build’

类型
列出的值之一
可选值
deep · shallow
默认值
shallow
The depth the static analyzer uses during the Build action. Use Deep to exercise the full power of the analyzer. Use Shallow for faster analysis.
Apple 页面

CLANG_STATIC_ANALYZER_MODE_ON_ANALYZE_ACTION

Mode of Analysis for ‘Analyze’

类型
列出的值之一
可选值
deep · shallow
默认值
deep
The depth the static analyzer uses during the Analyze action. Use Deep to exercise the full power of the analyzer. Use Shallow for faster analysis.
Apple 页面

CLANG_TRIVIAL_AUTO_VAR_INIT

Trivial automatic variable initialization

类型
列出的值之一
可选值
default · pattern · uninitialized · zero
默认值
$(_CLANG_TRIVIAL_AUTO_VAR_INIT_DEFAULT)
Specify whether stack variables should be uninitialized, which can cause inadvertent information disclosure when uninitialized stack variables are used, or whether they should be pattern-initialized.
Apple 页面

CLANG_USE_OPTIMIZATION_PROFILE

Use Optimization Profile

类型
布尔值(YES 或 NO)
默认值
NO
When this setting is enabled, clang will use the optimization profile collected for a target when building it.
Apple 页面

CLANG_USE_RESPONSE_FILE

Use Response Files

类型
布尔值(YES 或 NO)
默认值
YES
When this setting is enabled, the build system will use response files to share common arguments between similar invocations of clang, eliminating redundant information in build logs.
Apple 页面

CLANG_WARN_ASSIGN_ENUM

Out-of-Range Enum Assignments

类型
布尔值(YES 或 NO)
默认值
NO
Warn about assigning integer constants to enum values that are out of the range of the enumerated type.
Apple 页面

CLANG_WARN_ATOMIC_IMPLICIT_SEQ_CST

Usage of implicit sequentially-consistent atomics

类型
布尔值(YES 或 NO)
默认值
NO
Warns when an atomic is used with an implicitly sequentially-consistent memory order, instead of explicitly specifying memory order.
Apple 页面

CLANG_WARN_BOOL_CONVERSION

Implicit Boolean Conversions

类型
列出的值之一
可选值
NO · YES · YES_ERROR
默认值
$(CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION)
Warn about implicit conversions to boolean values that are suspicious. For example, writing if (foo) where foo is the name a function will trigger a warning.
Apple 页面

CLANG_WARN_COMMA

Suspicious Commas

类型
列出的值之一
可选值
NO · YES · YES_ERROR
默认值
NO
Warn about suspicious uses of the comma operator.
Apple 页面

CLANG_WARN_COMPLETION_HANDLER_MISUSE

Completion Handler Misuse

类型
布尔值(YES 或 NO)
默认值
NO
Warn when a function-like parameter annotated as a completion handler is called more than once or not called at all on an execution path.
Apple 页面

CLANG_WARN_CONSTANT_CONVERSION

Implicit Constant Conversions

类型
列出的值之一
可选值
NO · YES · YES_ERROR
默认值
$(CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION)
Warn about implicit conversions of constant values that cause the constant value to change, either through a loss of precision, or entirely in its meaning.
Apple 页面

CLANG_WARN_CXX0X_EXTENSIONS

Using C++11 extensions in earlier versions of C++

类型
布尔值(YES 或 NO)
默认值
NO
When compiling C++ code using a language standard older than C++11, warn about the use of C++11 extensions.
Apple 页面

CLANG_WARN_DELETE_NON_VIRTUAL_DTOR

Deleting Instance of Polymorphic Class with No Virtual Destructor

类型
列出的值之一
可选值
NO · YES · YES_ERROR
默认值
YES
Warn when deleting an instance of a polymorphic class with virtual functions but without a virtual destructor.
Apple 页面

CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS

Overriding Deprecated Objective-C Methods

类型
布尔值(YES 或 NO)
默认值
NO
Warn if an Objective-C class either subclasses a deprecated class or overrides a method that has been marked deprecated or unavailable.
Apple 页面

CLANG_WARN_DIRECT_OBJC_ISA_USAGE

Direct usage of ‘isa’

类型
列出的值之一
可选值
NO · YES · YES_ERROR
默认值
YES
Warn about direct accesses to the Objective-C isa pointer instead of using a runtime API.
Apple 页面

CLANG_WARN_EMPTY_BODY

Empty Loop Bodies

类型
布尔值(YES 或 NO)
默认值
$(CLANG_ENABLE_SECURITY_COMPILER_WARNINGS)
Warn about loop bodies that are suspiciously empty.
Apple 页面

CLANG_WARN_ENUM_CONVERSION

Implicit Enum Conversions

类型
列出的值之一
可选值
NO · YES · YES_ERROR
默认值
$(CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION)
Warn about implicit conversions between different kinds of enum values. For example, this can catch issues when using the wrong enum flag as an argument to a function or method.
Apple 页面

CLANG_WARN_FLOAT_CONVERSION

Implicit Float Conversions

类型
列出的值之一
可选值
NO · YES · YES_ERROR
默认值
$(CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION)
Warn about implicit conversions that turn floating-point numbers into integers.
Apple 页面

CLANG_WARN_IMPLICIT_FALLTHROUGH

Implicit Fallthrough in Switch Statement

类型
列出的值之一
可选值
NO · YES · YES_ERROR
默认值
NO
Warn about implicit fallthrough in switch statement. Use __attribute__((fallthrough)) (C/ObjC) or [[fallthrough]] (C++) to mark intentional fallthrough.
Apple 页面

CLANG_WARN_INT_CONVERSION

Implicit Integer to Pointer Conversions

类型
列出的值之一
可选值
NO · YES · YES_ERROR
默认值
$(CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION)
Warn about implicit conversions between pointers and integers. For example, this can catch issues when one incorrectly intermixes using NSNumber*’s and raw integers.
Apple 页面

CLANG_WARN_MISSING_NOESCAPE

Missing Noescape Annotation

类型
列出的值之一
可选值
NO · YES · YES_ERROR
默认值
YES
Warn about noescape annotations that are missing in a method’s signature.
Apple 页面

CLANG_WARN_NON_LITERAL_NULL_CONVERSION

Implicit Non-Literal Null Conversions

类型
列出的值之一
可选值
NO · YES · YES_ERROR
默认值
$(CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION)
Warn about non-literal expressions that evaluate to zero being treated as a null pointer.
Apple 页面

CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE

Implicit ownership types on out parameters

类型
布尔值(YES 或 NO)
默认值
NO
Warn about implicit ownership types on Objective-C object references as out parameters. For example, declaring a parameter with type NSObject** will produce a warning because the compiler will assume that the out parameter’s ownership type is __autoreleasing.
Apple 页面

CLANG_WARN_OBJC_LITERAL_CONVERSION

Implicit Objective-C Literal Conversions

类型
列出的值之一
可选值
NO · YES · YES_ERROR
默认值
$(CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION)
Warn about implicit conversions from Objective-C literals to values of incompatible type.
Apple 页面

CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS

Implicit Synthesized Properties

类型
布尔值(YES 或 NO)
默认值
NO
Starting in Xcode 4.4, Apple Clang will implicitly synthesize properties that are not explicitly synthesized using @synthesize. This setting warns about such implicit behavior, even though the property is still synthesized. This is essentially a backwards compatibility warning, or for those who wish to continue to explicitly use @synthesize.
Apple 页面

CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK

Repeatedly using a __weak reference

类型
列出的值之一
可选值
NO · YES · YES_AGGRESSIVE
默认值
NO
Warn about repeatedly using a weak reference without assigning the weak reference to a strong reference. This is often symptomatic of a race condition where the weak reference can become nil between accesses, resulting in unexpected behavior. Assigning to temporary strong reference ensures the object stays alive during the related accesses.
Apple 页面

CLANG_WARN_OBJC_ROOT_CLASS

Unintentional Root Class

类型
列出的值之一
可选值
NO · YES · YES_ERROR
默认值
YES
Warn about classes that unintentionally do not subclass a root class, such as NSObject.
Apple 页面

CLANG_WARN_PRAGMA_PACK

Suspicious Pragma Pack

类型
列出的值之一
可选值
NO · YES · YES_ERROR
默认值
YES
Warn when a translation unit is missing terminating ‘#pragma pack (pop)’ directives or when the ‘#pragma pack’ state immediately after an #include is different from the state immediately before.
Apple 页面

CLANG_WARN_PRIVATE_MODULE

Outdated Private Module Map

类型
布尔值(YES 或 NO)
默认值
YES
Warn about private modules that do not use the recommended private module layout.
Apple 页面

CLANG_WARN_UNGUARDED_AVAILABILITY

Unguarded availability

类型
列出的值之一
可选值
NO · YES · YES_AGGRESSIVE
默认值
YES
Warn if an API that is newer than the deployment target is used without “if (@available(…))” guards.
Apple 页面

CLANG_WARN_VEXING_PARSE

Ambiguous C++ Parsing Situation

类型
列出的值之一
可选值
NO · YES · YES_ERROR
默认值
YES
Warn about a parsing ambiguity between a variable declaration and a function-style cast.
Apple 页面

CLANG_X86_VECTOR_INSTRUCTIONS

Enable Additional Vector Extensions

类型
列出的值之一
可选值
avx · avx2 · avx512 · default · sse3 · sse4.1 · sse4.2 · ssse3
默认值
$(DEFAULT_SSE_LEVEL_4_2_$(GCC_ENABLE_SSE42_EXTENSIONS))
Enables the use of extended vector instructions. Only used when targeting Intel architectures.
Apple 页面

CODE_SIGN_IDENTITY

Code Signing Identity

类型
字符串
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.
Apple 页面

CODE_SIGN_INJECT_BASE_ENTITLEMENTS

Code Signing Inject Base Entitlements

类型
布尔值(YES 或 NO)
默认值
YES
Automatically inject entitlements from the platform’s BaseEntitlements.plist into the code signatures of executables.
Apple 页面

CODE_SIGN_STYLE

Code Sign Style

类型
列出的值之一
可选值
Automatic · Manual
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.
Apple 页面

COMBINE_HIDPI_IMAGES

COMBINE_HIDPI_IMAGES

类型
布尔值(YES 或 NO)
默认值
NO
Combines image files at different resolutions into one multi-page TIFF file that is HiDPI compliant for macOS 10.7 and later. Only image files in the same directory and with the same base name and extension are combined. The file names must conform to the naming convention used in HiDPI.
Apple 页面

COMPILER_INDEX_STORE_ENABLE

Enable Index-While-Building Functionality

类型
列出的值之一
可选值
Default · NO · YES
默认值
Default
Control whether the compiler should emit index data while building.
Apple 页面

COMPRESS_PNG_FILES

Compress PNG Files

类型
布尔值(YES 或 NO)
默认值
YES
If enabled, PNG resource files are compressed as they are copied.
Apple 页面

CONFIGURATION

CONFIGURATION

类型
字符串
Identifies the build configuration, such as Debug or Release, that the target uses to generate the product.
Apple 页面

CONFIGURATION_BUILD_DIR

Per-configuration Build Products Path

类型
路径
默认值
$(BUILD_DIR)
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).
Apple 页面

CONFIGURATION_TEMP_DIR

Per-configuration Intermediate Build Files Path

类型
路径
默认值
$(PROJECT_TEMP_DIR)
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).
Apple 页面

COPY_HEADERS_RUN_UNIFDEF

Run unifdef on Product Headers

类型
布尔值(YES 或 NO)
默认值
NO
If enabled, headers are run through the unifdef(1) tool when copied to the product.
Apple 页面

COPY_HEADERS_UNIFDEF_FLAGS

Unifdef Flags for Product Headers

类型
字符串列表
Specifies the flags to pass to unifdef(1) when invoking that tool to copy headers. This setting has no effect unless COPY_HEADERS_RUN_UNIFDEF is enabled.
Apple 页面

COPY_PHASE_STRIP

Strip Debug Symbols During Copy

类型
布尔值(YES 或 NO)
默认值
YES
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.
Apple 页面

COREML_CODEGEN_LANGUAGE

CoreML Model Class Generation Language

类型
列出的值之一
可选值
Automatic · None · Objective-C · Swift
默认值
Automatic
The Source-code language to use for generated CoreML model class. By default “Automatic” will analyze your project to determine the correct language. Adjust this setting to explicitly select “Swift” or “Objective-C”, or select “None” to disable model class generation.
Apple 页面

COREML_CODEGEN_SWIFT_GLOBAL_MODULE

CoreML Generated Model Inherits NSObject

类型
布尔值(YES 或 NO)
默认值
NO
Generate Swift model classes that are marked with @objc and are descendants of NSObject, in order to be accessible and usable in Objective-C. This setting has no effect if “CoreML Model Class Generation Language” is set to “Objective-C”.
Apple 页面

CPP_PREPROCESSOR_DEFINITIONS

Cpp Preprocessor Definitions

类型
字符串列表
Space-separated list of preprocessor macros of the form foo or foo=bar. These macros are used when preprocessing using the standalone C Preprocessor rule.
Apple 页面

CREATE_INFOPLIST_SECTION_IN_BINARY

Create Info.plist Section in Binary

类型
布尔值(YES 或 NO)
默认值
NO
Enabling this setting creates a section called __info_plist in the __TEXT segment of the product’s linked binary containing the processed Info.plist file for the target. You can read the processed Info.plist file from the linked binary at runtime using the CFBundle and NSBundle (Objective-C) or NSBundle (Swift) APIs. To print the processed Info.plist file, use the plutil(1) command-line utility. This setting only applies to command-line tool targets.
Apple 页面

CURRENT_PROJECT_VERSION

Current Project Version

类型
字符串
This setting defines the current version of the project. The value must be a integer or floating point number, such as 57 or 365.8. When GENERATE_INFOPLIST_FILE is enabled, sets the value of the CFBundleVersion key in the Info.plist file to the value of this build setting.
Apple 页面

C_COMPILER_LAUNCHER

Compiler Launcher

类型
字符串
The path to a compiler launcher. This build setting causes the build system to invoke the launcher tool with the original compiler path and arguments. Examples include distcc and ccache. Don’t use the CC, CPLUSPLUS, OBJCC, or OBJCPLUSPLUS build settings to specify a compiler launcher.
Apple 页面

DEAD_CODE_STRIPPING

Dead Code Stripping

类型
布尔值(YES 或 NO)
默认值
NO
Activating this setting causes the -dead_strip flag to be passed to ld(1) via cc(1) to turn on dead code stripping.
Apple 页面

DEBUG_INFORMATION_FORMAT

Debug Information Format

类型
列出的值之一
可选值
dwarf · dwarf-with-dsym
默认值
dwarf
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]
Apple 页面

DEBUG_INFORMATION_VERSION

Debug Information Version

类型
列出的值之一
可选值
compiler-default · dwarf4 · dwarf5
默认值
compiler-default
The format of the debug information to produce. • Compiler Default: The compiler will emit debug information of a version appropriate for the platform and minimum deployment target being built. [compiler-default] • DWARF 4: The compiler will emit DWARF 4 debug information. [dwarf4] • DWARF 5: The compiler will emit DWARF 5 debug information. [dwarf5]
Apple 页面

DEFINES_MODULE

Defines Module

类型
布尔值(YES 或 NO)
默认值
NO
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.
Apple 页面

DEPLOYMENT_LOCATION

Deployment Location

类型
布尔值(YES 或 NO)
默认值
NO
If enabled, built products are placed in their installed locations in addition to the built products folder.
Apple 页面

DEPLOYMENT_POSTPROCESSING

Deployment Postprocessing

类型
布尔值(YES 或 NO)
默认值
NO
If enabled, indicates that binaries should be stripped and file mode, owner, and group information should be set to standard values.
Apple 页面

DEPLOYMENT_TARGET_SETTING_NAME

Deployment Target Build Setting Name

类型
字符串
The name of the build setting for the deployment target for the effective platform. This can be used to evaluate the build setting using build setting interpolation without hard-coding the name, e.g. $($(DEPLOYMENT_TARGET_SETTING_NAME)), or to compose the names of other settings which contain its name, such as the RECOMMENDED_<platform>_DEPLOYMENT_TARGET settings.
Apple 页面

DERIVED_FILE_DIR

DERIVED_FILE_DIR

类型
路径
Identifies the directory into which derived source files, such as those generated by lex and yacc, are placed.
Apple 页面

DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER

Derive Mac Catalyst Product Bundle Identifier

类型
布尔值(YES 或 NO)
默认值
NO
When enabled, Xcode will automatically derive a bundle identifier for this target from its original bundle identifier when it’s building for Mac Catalyst.
Apple 页面

DEVELOPMENT_ASSET_PATHS

Development Assets

类型
字符串列表
Files and directories used only for development. Archive and install builds will exclude this content.
Apple 页面

DEVELOPMENT_TEAM

Development Team

类型
字符串
The team ID of a development team to use for signing certificates and provisioning profiles.
Apple 页面

DOCC_ENABLE_CXX_SUPPORT

Build Documentation for C++/Objective-C++

类型
布尔值(YES 或 NO)
默认值
YES
Include documentation for symbols defined in C++/Objective-C++ headers.
Apple 页面

DOCC_EXTRACT_EXTENSION_SYMBOLS

Include Documentation for Symbols in Swift Extensions

类型
布尔值(YES 或 NO)
默认值
YES
Extract Swift symbol information for symbols defined within an extension to a type that is not defined in the current module.
Apple 页面

DOCC_EXTRACT_OBJC_INFO_FOR_SWIFT_SYMBOLS

Build Multi-Language Documentation for Swift Only Targets

类型
布尔值(YES 或 NO)
默认值
NO
Extract Objective-C symbol information for targets that contain only Swift code so that the documentation output can be read as both Swift and Objective-C.
Apple 页面

DOCC_EXTRACT_SWIFT_INFO_FOR_OBJC_SYMBOLS

Build Multi-Language Documentation for Objective-C Only Targets

类型
布尔值(YES 或 NO)
默认值
NO
Extract Swift symbol information for targets that contain only Objective-C code so that the documentation output can be read as both Swift and Objective-C.
Apple 页面

DOCC_HOSTING_BASE_PATH

DocC Archive Hosting Base Path

类型
字符串
The base path your documentation website will be hosted at. For example, if you plan on hosting your DocC archive at https://example.com/ProjectName/documentation instead of https://example.com/documentation, set this value to "ProjectName".
Apple 页面

DONT_GENERATE_INFOPLIST_FILE

Don’t Force Info.plist Generation

类型
布尔值(YES 或 NO)
默认值
NO
If enabled, don’t automatically generate an Info.plist file for wrapped products when the INFOPLIST_FILE build setting is empty.
Apple 页面

DSTROOT

Installation Build Products Location

类型
路径
默认值
/tmp/$(PROJECT_NAME).dst
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.
Apple 页面

DSYMUTIL_EMBED_RESOURCES

DSYMUTIL_EMBED_RESOURCES

类型
字符串列表
A list of resources to embed into the dSYM bundle. Each entry has the form ‘=’ where the source path is a file or directory on disk and the destination path is relative to the bundle’s Contents/Resources directory.
Apple 页面

DTRACE_OTHER_FLAGS

Other DTrace Flags

类型
字符串列表
Space-separated list of additional flags to pass to the dtrace compiler. Be sure to backslash-escape any arguments that contain spaces or special characters, such as path names that may contain spaces. Use this setting if Xcode does not already provide UI for a particular dtrace flag.
Apple 页面

DYLIB_COMPATIBILITY_VERSION

Compatibility Version

类型
字符串
Determines the compatibility version of the resulting library, bundle, or framework binary. See Dynamic Library Design Guidelines in Dynamic Library Programming Topics for details on assigning version numbers of dynamic libraries.
Apple 页面

DYLIB_CURRENT_VERSION

Current Library Version

类型
字符串
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. See Dynamic Library Design Guidelines in Dynamic Library Programming Topics for details on assigning version numbers of dynamic libraries.
Apple 页面

DYLIB_INSTALL_NAME_BASE

Dynamic Library Install Name Base

类型
字符串
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.
Apple 页面

EAGER_LINKING

Eager Linking

类型
布尔值(YES 或 NO)
默认值
NO
If enabled, the build system will emit a TBD file for Swift-only framework and dynamic library targets to unblock linking of dependent targets before their dependency has finished linking.
Apple 页面

EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE

Embed Asset Packs In Product Bundle

类型
布尔值(YES 或 NO)
默认值
NO
Embed all the built asset packs inside the product bundle. Since this negates the performance benefits of the On Demand Resources feature, it is only useful for testing purposes when it isn’t practical to use an asset pack server.
Apple 页面

ENABLE_CODE_COVERAGE

Enable Code Coverage Support

类型
布尔值(YES 或 NO)
默认值
YES
Enables building with code coverage instrumentation. This is only used when the build has code coverage enabled, which is typically done via the Xcode scheme or test plan settings.
Apple 页面

ENABLE_CPLUSPLUS_BOUNDS_SAFE_BUFFERS

Enforce Bounds-Safe Buffer Usage in C++

类型
布尔值(YES 或 NO)
默认值
NO
Enables a strict programming model that guarantees bounds safety in C++ by rejecting raw pointer arithmetic (enabling the -Wunsafe-buffer-usage warning as an error) and requiring the use of hardened C++ Standard Library APIs for buffer manipulation.
Apple 页面

ENABLE_C_BOUNDS_SAFETY

Enable Language Extension for Bounds Safety in C

类型
布尔值(YES 或 NO)
默认值
NO
Enables the -fbounds-safety language extension, which guarantees bounds safety for C.
Apple 页面

ENABLE_DEBUG_DYLIB

Enable Debug Dylib Support

类型
布尔值(YES 或 NO)
If enabled, debug builds of app and app extension targets on supported platforms and SDKs will be built with the main binary code in a separate “NAME.debug.dylib”. A stub executor that loads the dylib will be the main binary. Enabling this setting is required for the previews execution engine and other modern development features to work. You can disable this setting if your target is not compatible.
Apple 页面

ENABLE_ENHANCED_SECURITY

Enable Enhanced Security

类型
布尔值(YES 或 NO)
默认值
NO
Enables a set of security build settings, including pointer authentication, typed allocator support, hardened C++ standard library, and security-related compiler warnings. These settings can be disabled individually.
Apple 页面

ENABLE_HARDWARE_CHECKED_POINTER_ARITHMETIC_SLICE

Enable Hardware-Checked Pointer Arithmetic Slice

类型
布尔值(YES 或 NO)
默认值
NO
Builds the target with hardware-checked pointer arithmetic enabled. Adds an additional architectural slice (arm64e.x1) with hardware-checked pointer arithmetic instructions to ARCHS_STANDARD. Has no effect if ARCHS has been overridden to not be based on ARCHS_STANDARD.
Apple 页面

ENABLE_INCREMENTAL_DISTILL

Enable Incremental Distill

类型
布尔值(YES 或 NO)
默认值
NO
Enabled the incremental distill option in the asset catalog compiler. This feature is experimental and should only be enabled with caution.
Apple 页面

ENABLE_MODULE_VERIFIER

Enable Module Verifier

类型
布尔值(YES 或 NO)
默认值
$(CLANG_MODULES_ENABLE_VERIFIER_TOOL)
Enables clang module verification for frameworks.
Apple 页面

ENABLE_NS_ASSERTIONS

Enable Foundation Assertions

类型
布尔值(YES 或 NO)
默认值
YES
Controls whether assertion logic provided by NSAssert is included in the preprocessed source code or is elided during preprocessing. Disabling assertions can improve code performance.
Apple 页面

ENABLE_ONLY_ACTIVE_RESOURCES

Build Active Resources Only

类型
布尔值(YES 或 NO)
默认值
YES
Omit inapplicable resources when building for a single device. For example, when building for a device with a Retina display, exclude 1x resources.
Apple 页面

ENABLE_ON_DEMAND_RESOURCES

Enable On Demand Resources

类型
布尔值(YES 或 NO)
默认值
NO
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.
Apple 页面

ENABLE_POINTER_AUTHENTICATION

Enable Pointer Authentication

类型
布尔值(YES 或 NO)
默认值
$(ENABLE_ENHANCED_SECURITY)
Builds the target with pointer authentication enabled. Adds an additional architectural slice (arm64e) with pointer authentication instructions to ARCHS_STANDARD. Has no effect if ARCHS has been overridden to not be based on ARCHS_STANDARD
Apple 页面

ENABLE_SECURITY_COMPILER_WARNINGS

Enable Security-Relevant Compiler Warnings

类型
布尔值(YES 或 NO)
默认值
$(ENABLE_ENHANCED_SECURITY)
Enables a set of security-relevant compiler warnings that check for common bounds-safety and lifetime-safety issues.
Apple 页面

ENABLE_STRICT_OBJC_MSGSEND

Enable Strict Checking of objc_msgSend Calls

类型
布尔值(YES 或 NO)
默认值
NO
Controls whether objc_msgSend calls must be cast to the appropriate function pointer type before being called.
Apple 页面

ENABLE_TESTABILITY

Enable Testability

类型
布尔值(YES 或 NO)
默认值
NO
Enabling this setting will build the target with options appropriate for running automated tests against its product. This setting can be enabled when building targets for debugging if their products will be tested. This may result in tests running slower than otherwise. When this setting is enabled: • GCC_SYMBOLS_PRIVATE_EXTERN is disabled (-fvisibility=hidden will not be passed to clang). • -enable-testing is passed to the Swift compiler. • -rdynamic is passed to the linker. • STRIP_INSTALLED_PRODUCT is disabled (strip will not be run on the produced binary).
Apple 页面

ENABLE_TESTING_SEARCH_PATHS

Enable Testing Search Paths

类型
布尔值(YES 或 NO)
默认值
NO
Specifies whether the build system should add the search paths necessary for compiling and linking against testing-related libraries or frameworks. This setting is enabled by default if the target is a test target or if the target explicitly links to the Testing, XCTest, or StoreKitTest frameworks.
Apple 页面

ENABLE_USER_SCRIPT_SANDBOXING

User Script Sandboxing

类型
布尔值(YES 或 NO)
默认值
NO
If enabled, the build system will sandbox user scripts to disallow undeclared input/output dependencies.
Apple 页面

ENABLE_USER_SELECTED_FILES

Enable User Selected Files

类型
列出的值之一
可选值
readonly · readwrite
This setting indicates whether App Sandbox allows access to files the user selects with an Open or Save dialog.
Apple 页面

EXCLUDED_ARCHS

Excluded Architectures

类型
字符串列表
A list of architectures for which the target should not be built. These architectures will be removed from the list in ARCHS when the target is built. If the resulting list of architectures is empty, no binary will be produced. This can be used to declare architectures a target does not support for use in environments where ARCHS is being overridden at a higher level (e.g., via xcodebuild).
Apple 页面

EXCLUDED_EXPLICIT_TARGET_DEPENDENCIES

Excluded Explicit Target Dependencies

类型
字符串列表
A list of patterns (as defined by fnmatch(3)) specifying the names of explicit target dependencies to exclude when determining which targets to build (see also INCLUDED_EXPLICIT_TARGET_DEPENDENCIES). This setting can be used to define complex filters for which targets should be built in response to other build settings.
Apple 页面

EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES

Sub-Directories to Exclude in Recursive Searches

类型
字符串列表
默认值
*.nib *.lproj *.framework *.gch *.xcode* *.xcassets *.icon (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj
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* *.xcassets *.icon (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj. Normally, if you override this value you should include the default values via the $(inherited) macro.
Apple 页面

EXCLUDED_SOURCE_FILE_NAMES

Excluded Source File Names

类型
字符串列表
A list of patterns (as defined by fnmatch(3)) specifying the names of source files to explicitly exclude when processing the files in the target’s build phases (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.
Apple 页面

EXECUTABLE_EXTENSION

Executable Extension

类型
字符串
This is the extension used for the executable product generated by the target, which has a default value based on the product type.
Apple 页面

EXECUTABLE_NAME

EXECUTABLE_NAME

类型
字符串
Specifies the name of the binary the target produces. When GENERATE_INFOPLIST_FILE is enabled, sets the value of the CFBundleExecutable key in the Info.plist file to the value of this build setting.
Apple 页面

EXECUTABLE_PREFIX

Executable Prefix

类型
字符串
The prefix used for the executable product generated by the target, which has a default value based on the product type.
Apple 页面

EXECUTABLE_SUFFIX

EXECUTABLE_SUFFIX

类型
字符串
Specifies the suffix of the binary filename, including the character that separates the extension from the rest of the bundle name.
Apple 页面

EXPORTED_SYMBOLS_FILE

Exported Symbols File

类型
路径
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.
Apple 页面

FRAMEWORK_SEARCH_PATHS

Framework Search Paths

类型
路径列表
默认值
$(FRAMEWORK_SEARCH_PATHS)
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.
Apple 页面

FRAMEWORK_VERSION

Framework Version

类型
字符串
默认值
A
Framework bundles are versioned by having contents in subfolders of a version folder that has links to the current version and its contents.
Apple 页面

FUSE_BUILD_SCRIPT_PHASES

Run Build Script Phases in Parallel

类型
布尔值(YES 或 NO)
默认值
NO
If enabled, consecutive run script phases will be allowed to run in parallel if they fully specify their input and output dependencies.
Apple 页面

GCC_CHAR_IS_UNSIGNED_CHAR

‘char’ Type Is Unsigned

类型
布尔值(YES 或 NO)
默认值
NO
Enabling this setting causes char to be unsigned by default, disabling it causes char to be signed by default.
Apple 页面

GCC_CW_ASM_SYNTAX

CodeWarrior/MS-Style Inline Assembly

类型
布尔值(YES 或 NO)
默认值
YES
Enable the CodeWarrior/Microsoft syntax for inline assembly code in addition to the standard GCC syntax.
Apple 页面

GCC_C_LANGUAGE_STANDARD

C Language Dialect

类型
列出的值之一
可选值
ansi · c11 · c17 · c23 · c89 · c99 · compiler-default · gnu11 · gnu17 · gnu23 · gnu89 · gnu99
默认值
compiler-default
Choose a standard or non-standard C language dialect. • ANSI C: Accept ISO C90 and ISO C++, turning off GNU extensions that are incompatible. [-ansi] Incompatible GNU extensions include the asm, inline, and typeof keywords (but not the equivalent __asm__, __inline__, and __typeof__ forms), and the // syntax for comments. This setting also enables trigraphs. • C89: Accept ISO C90 (1990), but not GNU extensions. [-std=c89] • GNU89: Accept ISO C90 and GNU extensions. [-std=gnu89] • C99: Accept ISO C99 (1999), but not GNU extensions. [-std=c99] • GNU99: Accept ISO C99 and GNU extensions. [-std=gnu99] • C11: Accept ISO C11 (2011), but not GNU extensions. [-std=c11] • GNU11: Accept ISO C11 and GNU extensions. [-std=gnu11] • C17: Accept ISO C17 (2018), but not GNU extensions. [-std=c17] • GNU17: Accept ISO C17 and GNU extensions. [-std=gnu17] • C23: Accept ISO C23 (2024), but not GNU extensions. [-std=c23] • GNU23: Accept ISO C23 and GNU extensions. [-std=gnu23] • Compiler Default: Tells the compiler to use its default C language dialect. This is normally the best choice unless you have specific needs. (Currently equivalent to GNU99.)
Apple 页面

GCC_DYNAMIC_NO_PIC

Generate Position-Dependent Code

类型
布尔值(YES 或 NO)
默认值
NO
Faster function calls for applications. Not appropriate for shared libraries, which need to be position-independent.
Apple 页面

GCC_ENABLE_ASM_KEYWORD

Allow ‘asm’, ‘inline’, ‘typeof’

类型
布尔值(YES 或 NO)
默认值
YES
Controls whether asm, inline, and typeof are treated as keywords or whether they can be used as identifiers.
Apple 页面

GCC_ENABLE_BUILTIN_FUNCTIONS

Recognize Builtin Functions

类型
布尔值(YES 或 NO)
默认值
YES
Controls whether builtin functions that do not begin with __builtin_ as prefix are recognized. GCC normally generates special code to handle certain builtin functions more efficiently; for instance, calls to alloca may become single instructions that adjust the stack directly, and calls to memcpy may become inline copy loops. The resulting code is often both smaller and faster, but since the function calls no longer appear as such, you cannot set a breakpoint on those calls, nor can you change the behavior of the functions by linking with a different library. In addition, when a function is recognized as a builtin function, GCC may use information about that function to warn about problems with calls to that function, or to generate more efficient code, even if the resulting code still contains calls to that function. For example, warnings are given with -Wformat for bad calls to printf, when printf is built in, and strlen is known not to modify global memory.
Apple 页面

GCC_ENABLE_CPP_EXCEPTIONS

Enable C++ Exceptions

类型
布尔值(YES 或 NO)
默认值
YES
Enable C++ exception handling. Generates extra code needed to propagate exceptions. For some targets, this implies GCC will generate frame unwind information for all functions, which can produce significant data size overhead, although it does not affect execution. If you do not specify this option, GCC will enable it by default for languages like C++ that normally require exception handling, and disable it for languages like C that do not normally require it. However, you may need to enable this option when compiling C code that needs to interoperate properly with exception handlers written in C++.
Apple 页面

GCC_ENABLE_CPP_RTTI

Enable C++ Runtime Types

类型
布尔值(YES 或 NO)
默认值
YES
Enable generation of information about every class with virtual functions for use by the C++ runtime type identification features (dynamic_cast and typeid). If you don’t use those parts of the language, you can save some space by using this flag. Note that exception handling uses the same information, but it will generate it as needed.
Apple 页面

GCC_ENABLE_EXCEPTIONS

Enable Exceptions

类型
布尔值(YES 或 NO)
Enable exception handling. Generates extra code needed to propagate exceptions. For some targets, this implies GCC will generate frame unwind information for all functions, which can produce significant data size overhead, although it does not affect execution. If you do not specify this option, GCC will enable it by default for languages like C++ and Objective-C that normally require exception handling, and disable it for languages like C that do not normally require it. However, you may need to enable this option when compiling C code that needs to interoperate properly with exception handlers written in other languages. You may also wish to disable this option if you are compiling older programs that don’t use exception handling.
Apple 页面

GCC_ENABLE_OBJC_EXCEPTIONS

Enable Objective-C Exceptions

类型
布尔值(YES 或 NO)
默认值
YES
This setting enables @try/@catch/@throw syntax for handling exceptions in Objective-C code. Only applies to Objective-C. [-fobjc-exceptions]
Apple 页面

GCC_ENABLE_PASCAL_STRINGS

Recognize Pascal Strings

类型
布尔值(YES 或 NO)
默认值
YES
Recognize and construct Pascal-style string literals. Its use in new code is discouraged. Pascal string literals take the form "\pstring" . The special escape sequence \p denotes the Pascal length byte for the string, and will be replaced at compile time with the number of characters that follow. The \p may only appear at the beginning of a string literal, and may not appear in wide string literals or as an integral constant.
Apple 页面

GCC_ENABLE_SSE3_EXTENSIONS

Enable SSE3 Extensions

类型
布尔值(YES 或 NO)
默认值
NO
Specifies whether the binary uses the builtin functions that provide access to the SSE3 extensions to the IA-32 architecture.
Apple 页面

GCC_ENABLE_SSE41_EXTENSIONS

Enable SSE4.1 Extensions

类型
布尔值(YES 或 NO)
默认值
NO
Specifies whether the binary uses the builtin functions that provide access to the SSE4.1 extensions to the IA-32 architecture.
Apple 页面

GCC_ENABLE_SSE42_EXTENSIONS

Enable SSE4.2 Extensions

类型
布尔值(YES 或 NO)
默认值
NO
Specifies whether the binary uses the builtin functions that provide access to the SSE4.2 extensions to the IA-32 architecture.
Apple 页面

GCC_FAST_MATH

Relax IEEE Compliance

类型
布尔值(YES 或 NO)
默认值
NO
Enables some floating point optimizations that are not IEEE754-compliant, but which usually work. Programs that require strict IEEE compliance may not work with this option.
Apple 页面

GCC_GENERATE_DEBUGGING_SYMBOLS

Generate Debug Symbols

类型
布尔值(YES 或 NO)
默认值
YES
Enables or disables generation of debug symbols. When debug symbols are enabled, the level of detail can be controlled by the DEBUG_INFORMATION_FORMAT setting.
Apple 页面

GCC_GENERATE_TEST_COVERAGE_FILES

Generate Legacy Test Coverage Files

类型
布尔值(YES 或 NO)
默认值
NO
Activating this setting causes a notes file to be produced that the gcov code-coverage utility can use to show program coverage.
Apple 页面

GCC_INCREASE_PRECOMPILED_HEADER_SHARING

Increase Sharing of Precompiled Headers

类型
布尔值(YES 或 NO)
默认值
NO
Enabling this option will enable increased sharing of precompiled headers among targets that share the same prefix header and precompiled header directory. Xcode distinguishes between precompiled header (PCH) files by generating a hash value based on the command-line options to the compiler used to create the PCH. Enabling this option will exclude certain compiler options from that hash. Presently this option will exclude search path options (-I, -iquote, -isystem, -F, -L) from the hash. Enabling increased sharing of PCH files carries some risk—if two targets use the same prefix header but have different include paths that cause the prefix header to include different files when they are precompiled, then subtle problems may result because one target will use a PCH that was built using files included by the other target. In this case, this option must be turned off in order to enforce correctness.
Apple 页面

GCC_INPUT_FILETYPE

Compile Sources As

类型
列出的值之一
可选值
automatic · sourcecode.c.c · sourcecode.c.objc · sourcecode.cpp.cpp · sourcecode.cpp.objcpp
默认值
automatic
Specifies whether to compile each source file according to its file type, or whether to treat all source files in the target as if they are of a specific language.
Apple 页面

GCC_NO_COMMON_BLOCKS

No Common Blocks

类型
布尔值(YES 或 NO)
默认值
NO
In C, allocate even uninitialized global variables in the data section of the object file, rather than generating them as common blocks. This has the effect that if the same variable is declared (without extern) in two different compilations, you will get an error when you link them.
Apple 页面

GCC_OPTIMIZATION_LEVEL

Optimization Level

类型
列出的值之一
可选值
0 · 1 · 2 · 3 · fast · s · z
默认值
s
Specifies the degree to which the generated code is optimized for speed and binary size. • None: Do not optimize. [-O0] With this setting, the compiler’s goal is to reduce the cost of compilation and to make debugging produce the expected results. Statements are independent—if you stop the program with a breakpoint between statements, you can then assign a new value to any variable or change the program counter to any other statement in the function and get exactly the results you would expect from the source code. • Fast: Optimizing compilation takes somewhat more time, and a lot more memory for a large function. [-O1] With this setting, the compiler tries to reduce code size and execution time, without performing any optimizations that take a great deal of compilation time. In Apple’s compiler, strict aliasing, block reordering, and inter-block scheduling are disabled by default when optimizing. • Faster: The compiler performs nearly all supported optimizations that do not involve a space-speed tradeoff. [-O2] With this setting, the compiler does not perform loop unrolling or function inlining, or register renaming. As compared to the Fast setting, this setting increases both compilation time and the performance of the generated code. • Fastest: Turns on all optimizations specified by the Faster setting and also turns on function inlining and register renaming options. This setting may result in a larger binary. [-O3] • Fastest, Smallest: Optimize for size. This setting enables all Faster optimizations that do not typically increase code size. It also performs further optimizations designed to reduce code size. [-Os] • Fastest, Aggressive Optimizations: This setting enables Fastest but also enables aggressive optimizations that may break strict standards compliance but should work well on well-behaved code. [-Ofast] • Smallest, Aggressive Size Optimizations: This setting enables additional size savings by isolating repetitive code patterns into a compiler generated function. [-Oz]
Apple 页面

GCC_PRECOMPILE_PREFIX_HEADER

Precompile Prefix Header

类型
布尔值(YES 或 NO)
Generates a precompiled header for the prefix header, which should reduce overall build times. Precompiling the prefix header will be most effective if the contents of the prefix header or any file it includes change rarely. If the contents of the prefix header or any file it includes change frequently, there may be a negative impact to overall build time.
Apple 页面

GCC_PREFIX_HEADER

Prefix Header

类型
路径
默认值
$(PREFIX_HEADER)
Implicitly include the named header. The path given should either be a project relative path or an absolute path.
Apple 页面

GCC_SHORT_ENUMS

Short Enumeration Constants

类型
布尔值(YES 或 NO)
默认值
NO
Make enums only as large as needed for the range of possible values. This setting generates code that may not be binary compatible with code generated without this setting or with macOS frameworks.
Apple 页面

GCC_STRICT_ALIASING

Enforce Strict Aliasing

类型
布尔值(YES 或 NO)
默认值
YES
Optimize code by making more aggressive assumptions about whether pointers can point to the same objects as other pointers. Programs that use pointers a lot may benefit from this, but programs that don’t strictly follow the ISO C rules about the type with which an object may be accessed may behave unexpectedly.
Apple 页面

GCC_SYMBOLS_PRIVATE_EXTERN

Symbols Hidden by Default

类型
布尔值(YES 或 NO)
默认值
NO
When enabled, all symbols are declared private extern unless explicitly marked to be exported using __attribute__((visibility("default"))) in code. If not enabled, all symbols are exported unless explicitly marked as private extern. See Controlling Symbol Visibility in C++ Runtime Environment Programming Guide.
Apple 页面

GCC_THREADSAFE_STATICS

Statics are Thread-Safe

类型
布尔值(YES 或 NO)
默认值
YES
Emits extra code to use the routines specified in the C++ ABI for thread-safe initialization of local statics. You can disable this option to reduce code size slightly in code that doesn’t need to be thread-safe.
Apple 页面

GCC_UNROLL_LOOPS

Unroll Loops

类型
布尔值(YES 或 NO)
默认值
NO
Unrolls loops. Unrolling makes the code larger, but may make it faster by reducing the number of branches executed.
Apple 页面

GCC_USE_STANDARD_INCLUDE_SEARCHING

Use Standard System Header Directory Searching

类型
布尔值(YES 或 NO)
默认值
YES
Controls whether the standard system directories are searched for header files. When disabled, only the directories you have specified with -I options (and the directory of the current file, if appropriate) are searched.
Apple 页面

GCC_VERSION

Compiler for C/C++/Objective-C

类型
字符串
The compiler to use for C, C++, and Objective-C.
Apple 页面

GCC_WARN_64_TO_32_BIT_CONVERSION

Implicit Conversion to 32 Bit Type

类型
列出的值之一
可选值
NO · YES · YES_ERROR
默认值
NO
Warn if a value is implicitly converted from a 64-bit type to a 32-bit type. This is a subset of the warnings provided by -Wconversion.
Apple 页面

GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO

Undefined Use of offsetof Macro

类型
布尔值(YES 或 NO)
默认值
YES
Unchecking this setting will suppress warnings from applying the offsetof macro to a non-POD type. According to the 1998 ISO C++ standard, applying offsetof to a non-POD type is undefined. In existing C++ implementations, however, offsetof typically gives meaningful results even when applied to certain kinds of non-POD types, such as a simple struct that fails to be a POD type only by virtue of having a constructor. This flag is for users who are aware that they are writing non-portable code and who have deliberately chosen to ignore the warning about it. The restrictions on offsetof may be relaxed in a future version of the C++ standard.
Apple 页面

GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS

Missing Fields in Structure Initializers

类型
布尔值(YES 或 NO)
默认值
NO
Warn if a structure’s initializer has some fields missing. For example, the following code would cause such a warning because x.h is implicitly zero: struct s { int f, g, h; }; struct s x = { 3, 4 }; This option does not warn about designated initializers, so the following modification would not trigger a warning: struct s { int f, g, h; }; struct s x = { .f = 3, .g = 4 };
Apple 页面

GCC_WARN_ABOUT_RETURN_TYPE

Mismatched Return Type

类型
列出的值之一
可选值
NO · YES · YES_ERROR
默认值
NO
Causes warnings to be emitted when a function with a defined return type (not void) contains a return statement without a return-value or when it does not contain any return statements. Also emits a warning when a function with a void return type tries to return a value.
Apple 页面

GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL

Incomplete Objective-C Protocols

类型
布尔值(YES 或 NO)
默认值
YES
Warn if methods required by a protocol are not implemented in the class adopting it. Only applies to Objective-C.
Apple 页面

GCC_WARN_CHECK_SWITCH_STATEMENTS

Check Switch Statements

类型
布尔值(YES 或 NO)
默认值
YES
Warn whenever a switch statement has an index of enumeral type and lacks a case for one or more of the named codes of that enumeration. The presence of a default label prevents this warning. Case labels outside the enumeration range also provoke warnings when this option is used.
Apple 页面

GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS

Overloaded Virtual Functions

类型
布尔值(YES 或 NO)
默认值
NO
Warn when a function declaration hides virtual functions from a base class. For example, in the following example, the A class version of f() is hidden in B. struct A { virtual void f(); }; struct B: public A { void f(int); }; As a result, the following code will fail to compile. B* b; b->f(); This setting only applies to C++ and Objective-C++ sources.
Apple 页面

GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED

Initializer Not Fully Bracketed

类型
布尔值(YES 或 NO)
默认值
NO
Warn if an aggregate or union initializer is not fully bracketed. In the following example, the initializer for a is not fully bracketed, but the initializer for b is fully bracketed. int a[2][2] = { 0, 1, 2, 3 }; int b[2][2] = { { 0, 1 }, { 2, 3 } };
Apple 页面

GCC_WARN_MISSING_PARENTHESES

Missing Braces and Parentheses

类型
布尔值(YES 或 NO)
默认值
YES
Warn if parentheses are omitted in certain contexts, such as when there is an assignment in a context where a truth value is expected, or when operators are nested whose precedence causes confusion. Also, warn about constructions where there may be confusion as to which if statement an else branch belongs. For example: { if (a) if (b) foo (); else bar (); } In C, every else branch belongs to the innermost possible if statement, which in the example above is if (b). This is often not what the programmer expects, as illustrated by indentation used in the example above. This build setting causes GCC to issue a warning when there is the potential for this confusion. To eliminate the warning, add explicit braces around the innermost if statement so there is no way the else could belong to the enclosing if. For example: { if (a) { if (b) foo (); else bar (); } }
Apple 页面

GCC_WARN_NON_VIRTUAL_DESTRUCTOR

Nonvirtual Destructor

类型
布尔值(YES 或 NO)
默认值
NO
Warn when a class declares an nonvirtual destructor that should probably be virtual, because it looks like the class will be used polymorphically. This is only active for C++ or Objective-C++ sources.
Apple 页面

GCC_WARN_PEDANTIC

Pedantic Warnings

类型
布尔值(YES 或 NO)
默认值
NO
Issue all the warnings demanded by strict ISO C and ISO C++; reject all programs that use forbidden extensions, and some other programs that do not follow ISO C and ISO C++. For ISO C, follows the version of the ISO C standard specified by any -std option used.
Apple 页面

GCC_WARN_SHADOW

Hidden Local Variables

类型
布尔值(YES 或 NO)
默认值
$(CLANG_ENABLE_SECURITY_COMPILER_WARNINGS)
Warn whenever a local variable shadows another local variable, parameter or global variable or whenever a builtin function is shadowed.
Apple 页面

GCC_WARN_SIGN_COMPARE

Sign Comparison

类型
布尔值(YES 或 NO)
默认值
NO
Warn when a comparison between signed and unsigned values could produce an incorrect result when the signed value is converted to unsigned.
Apple 页面

GCC_WARN_STRICT_SELECTOR_MATCH

Strict Selector Matching

类型
布尔值(YES 或 NO)
默认值
NO
Warn if multiple methods with differing argument and/or return types are found for a given selector when attempting to send a message using this selector to a receiver of type id or Class. When this setting is disabled, the compiler will omit such warnings if any differences found are confined to types that share the same size and alignment.
Apple 页面

GCC_WARN_TYPECHECK_CALLS_TO_PRINTF

Typecheck Calls to printf/scanf

类型
布尔值(YES 或 NO)
默认值
YES
Check calls to printf and scanf to make sure that the arguments supplied have types appropriate to the format string specified, and that the conversions specified in the format string make sense.
Apple 页面

GCC_WARN_UNDECLARED_SELECTOR

Undeclared Selector

类型
布尔值(YES 或 NO)
默认值
NO
Warn if a @selector(...) expression referring to an undeclared selector is found. A selector is considered undeclared if no method with that name has been declared before the @selector(...) expression, either explicitly in an @interface or @protocol declaration, or implicitly in an @implementation section. This option always performs its checks as soon as a @selector(...) expression is found, while -Wselector only performs its checks in the final stage of compilation. This also enforces the coding style convention that methods and selectors must be declared before being used.
Apple 页面

GCC_WARN_UNINITIALIZED_AUTOS

Uninitialized Variables

类型
列出的值之一
可选值
NO · YES · YES_AGGRESSIVE
默认值
NO
Warn if a variable might be clobbered by a setjmp call or if an automatic variable is used without prior initialization. The compiler may not detect all cases where an automatic variable is initialized or all usage patterns that may lead to use prior to initialization. You can toggle between the normal uninitialized value checking or the more aggressive (conservative) checking, which finds more issues but the checking is much stricter.
Apple 页面

GCC_WARN_UNKNOWN_PRAGMAS

Unknown Pragma

类型
布尔值(YES 或 NO)
默认值
NO
Warn when a #pragma directive is encountered that is not understood by GCC. If this command line option is used, warnings will even be issued for unknown pragmas in system header files. This is not the case if the warnings were only enabled by the -Wall command-line option.
Apple 页面

GCC_WARN_UNUSED_FUNCTION

Unused Functions

类型
布尔值(YES 或 NO)
默认值
NO
Warn whenever a static function is declared but not defined or a non-inline static function is unused.
Apple 页面

GCC_WARN_UNUSED_VARIABLE

Unused Variables

类型
布尔值(YES 或 NO)
默认值
NO
Warn whenever a local variable or nonconstant static variable is unused aside from its declaration.
Apple 页面

GENERATE_INTERMEDIATE_TEXT_BASED_STUBS

Enable Intermediate Text-Based Stubs Generation

类型
布尔值(YES 或 NO)
默认值
YES
Enables the generation of intermediate Text-Based stubs for dynamic libraries and frameworks to more precisely track linker dependencies in incremental builds.
Apple 页面

GENERATE_PKGINFO_FILE

Force Package Info Generation

类型
布尔值(YES 或 NO)
默认值
NO
Forces the PkgInfo file to be written to wrapped products even if this file is not expected.
Apple 页面

GENERATE_PROFILING_CODE

Generate Profiling Code

类型
布尔值(YES 或 NO)
默认值
NO
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).
Apple 页面

GENERATE_TEXT_BASED_STUBS

Enable Text-Based Stubs Generation

类型
布尔值(YES 或 NO)
默认值
NO
Enables the generation of Text-Based stubs for dynamic libraries and frameworks.
Apple 页面

HEADERMAP_INCLUDES_PROJECT_HEADERS

HEADERMAP_INCLUDES_PROJECT_HEADERS

类型
布尔值(YES 或 NO)
默认值
YES
Specifies whether the header map contains a name/path entry for every header in the project, regardless of the headers’ target membership.
Apple 页面

HEADER_SEARCH_PATHS

Header Search Paths

类型
路径列表
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.
Apple 页面

IBC_COCOATOUCH_COMPILER_MODE

Compiler Mode for CocoaTouch Documents

类型
列出的值之一
可选值
default · simulator · toolchain
默认值
default
Instructs the compiler on which compilation mode to use.
Apple 页面

IBC_COMPILER_AUTO_ACTIVATE_CUSTOM_FONTS

Auto-Activate Custom Fonts

类型
布尔值(YES 或 NO)
默认值
YES
Instructs the XIB compiler to add custom fonts to the application’s Info.plist, which will cause the fonts to activate upon application launch.
Apple 页面

IBC_ERRORS

Show Errors

类型
布尔值(YES 或 NO)
默认值
YES
Show errors encountered during the compilation of XIB files.
Apple 页面

IBC_FLATTEN_NIBS

Flatten Compiled XIB Files

类型
布尔值(YES 或 NO)
默认值
YES
If enabled, compile XIB files into flattened (non-wrapper) NIB files. After flattening, the resulting NIB is more compact but no longer editable by Interface Builder. When this option is disabled, the resulting NIB file remains editable in Interface Builder.
Apple 页面

IBC_MODULE

Default Module

类型
字符串
默认值
$(PRODUCT_MODULE_NAME)
Defines the module name for Swift classes referenced without a specific module name.
Apple 页面

IBC_NOTICES

Show Notices

类型
布尔值(YES 或 NO)
默认值
YES
Show notices encountered during the compilation of XIB files.
Apple 页面

IBC_OTHER_FLAGS

Other Interface Builder Compiler Flags

类型
字符串列表
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.
Apple 页面

IBC_OVERRIDING_PLUGINS_AND_FRAMEWORKS_DIR

Overriding Plug-In and Framework Directory

类型
路径
Instructs Interface Builder to load frameworks and Interface Builder plugins from the specified directory. Setting this value to $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) will ensure that Interface Builder will load frameworks and plug-ins from the built products directory of the current build configuration.
Apple 页面

IBC_PLUGINS

Plug-Ins

类型
字符串列表
A list of paths to Interface Builder plugins to load when compiling XIB files.
Apple 页面

IBC_STRIP_NIBS

Strip NIB Files

类型
布尔值(YES 或 NO)
默认值
$(IBC_FLATTEN_NIBS)
Strips an Interface Builder NIB to reduce its size for deployment. The resulting NIB is more compact but no longer editable by Interface Builder. When this option is disabled, the resulting NIB file remains editable by Interface Builder.
Apple 页面

IBC_WARNINGS

Show Warnings

类型
布尔值(YES 或 NO)
默认值
YES
Show warnings encountered during the compilation of XIB files.
Apple 页面

IBSC_COCOATOUCH_COMPILER_MODE

Compiler Mode for CocoaTouch Documents

类型
列出的值之一
可选值
default · simulator · toolchain
默认值
$(IBC_COCOATOUCH_COMPILER_MODE)
Instructs the compiler on which compilation mode to use.
Apple 页面

IBSC_COMPILER_AUTO_ACTIVATE_CUSTOM_FONTS

Auto-Activate Custom Fonts

类型
布尔值(YES 或 NO)
默认值
YES
Instructs the Storyboard compiler to add custom fonts to the application’s Info.plist that will cause the fonts to activate upon application launch.
Apple 页面

IBSC_ERRORS

Show Errors

类型
布尔值(YES 或 NO)
默认值
YES
Show errors encountered during the compilation of Storyboard files.
Apple 页面

IBSC_FLATTEN_NIBS

Flatten Compiled Storyboard Files

类型
布尔值(YES 或 NO)
默认值
YES
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.
Apple 页面

IBSC_MODULE

Default Module

类型
字符串
默认值
$(PRODUCT_MODULE_NAME)
Defines the module name for Swift classes referenced without a specific module name.
Apple 页面

IBSC_NOTICES

Show Notices

类型
布尔值(YES 或 NO)
默认值
YES
Show notices encountered during the compilation of Storyboard files.
Apple 页面

IBSC_OTHER_FLAGS

Other Storyboard Compiler Flags

类型
字符串列表
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.
Apple 页面

IBSC_STRIP_NIBS

Strip Storyboardc Files

类型
布尔值(YES 或 NO)
默认值
$(IBSC_FLATTEN_NIBS)
Strips an editable Interface Builder storyboardc file to reduce its size for deployment. The resulting storyboardc is more compact but no longer editable by Interface Builder. When this option is disabled, the resulting storyboardc file remains editable by Interface Builder.
Apple 页面

IBSC_WARNINGS

Show Warnings

类型
布尔值(YES 或 NO)
默认值
YES
Show warnings encountered during the compilation of Storyboard files.
Apple 页面

IMPLICIT_DEPENDENCY_DOMAIN

Implicit Dependency Domain

类型
字符串
默认值
default
The domain in which the target will match or be matched for implicit dependencies. An implicit dependency will only be established between two targets if they are both in the same domain.
Apple 页面

INCLUDED_EXPLICIT_TARGET_DEPENDENCIES

Included Explicit Target Dependencies

类型
字符串列表
A list of patterns (as defined by fnmatch(3)) specifying the names of explicit target dependencies to include when determining which targets to build. This setting is only useful when combined with EXCLUDED_EXPLICIT_TARGET_DEPENDENCIES, and can be used to define complex filters for which targets should be built in response to other build settings.
Apple 页面

INCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES

Sub-Directories to Include in Recursive Searches

类型
字符串列表
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.
Apple 页面

INCLUDED_SOURCE_FILE_NAMES

Included Source File Names

类型
字符串列表
A list of patterns (as defined by fnmatch(3)) specifying the names of source files to explicitly include when processing the files in the target’s build phases. 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.
Apple 页面

INDEX_STORE_ONLY_PROJECT_FILES

Index only project files

类型
布尔值(YES 或 NO)
默认值
NO
Only index the source files that are being compiled within this project. Do not emit data into the index store for system modules.
Apple 页面

INFOPLIST_FILE

Info.plist File

类型
路径
The project-relative path to the property list file that contains the Info.plist information used by bundles. The build system merges the values you specify in this file with other values it generates during the build process. The product type, target platform, App Privacy manifests, input from other build tools, and other built-in logic impact the contents of the final Info.plist file it produces. When GENERATE_INFOPLIST_FILE is enabled, the build system also includes content from build settings in the merge process. For details on information property list files, see Information Property List.
Apple 页面

INFOPLIST_KEY_GCSupportsGameMode

Supports Game Mode

类型
布尔值(YES 或 NO)
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the GCSupportsGameMode key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_KEY_LSApplicationCategoryType

Application Category

类型
列出的值之一
可选值
public.app-category.action-games · public.app-category.adventure-games · public.app-category.arcade-games · public.app-category.board-games · public.app-category.books · public.app-category.business · public.app-category.card-games · public.app-category.casino-games · public.app-category.developer-tools · public.app-category.dice-games · public.app-category.education · public.app-category.educational-games · public.app-category.entertainment · public.app-category.family-games · public.app-category.finance · public.app-category.food-and-drink · public.app-category.games · public.app-category.graphics-design · public.app-category.healthcare-fitness · public.app-category.kids-games · public.app-category.lifestyle · public.app-category.magazines-and-newspapers · public.app-category.medical · public.app-category.music · public.app-category.music-games · public.app-category.navigation · public.app-category.news · public.app-category.photography · public.app-category.productivity · public.app-category.puzzle-games · public.app-category.racing-games · public.app-category.reference · public.app-category.role-playing-games · public.app-category.shopping · public.app-category.simulation-games · public.app-category.social-networking · public.app-category.sports · public.app-category.sports-games · public.app-category.strategy-games · public.app-category.travel · public.app-category.trivia-games · public.app-category.utilities · public.app-category.video · public.app-category.weather · public.app-category.word-games
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the LSApplicationCategoryType key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_KEY_LSBackgroundOnly

Application is Background Only

类型
布尔值(YES 或 NO)
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the LSBackgroundOnly key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_KEY_LSUIElement

Application is Agent (UIElement)

类型
布尔值(YES 或 NO)
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the LSUIElement key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_KEY_MetalCaptureEnabled

Metal Capture Enabled

类型
布尔值(YES 或 NO)
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the MetalCaptureEnabled key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_KEY_NSAppDataUsageDescription

Privacy - Other Application Data Usage Description

类型
字符串
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the NSAppDataUsageDescription key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_KEY_NSFaceIDUsageDescription

Privacy - Face ID Usage Description

类型
字符串
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the NSFaceIDUsageDescription key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_KEY_NSMainNibFile

Main Nib File Base Name

类型
字符串
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the NSMainNibFile key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_KEY_NSMainStoryboardFile

AppKit Main Storyboard File Base Name

类型
字符串
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the NSMainStoryboardFile key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_KEY_NSPrincipalClass

Principal Class

类型
字符串
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the NSPrincipalClass key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_KEY_NSSiriUsageDescription

Privacy - Siri Usage Description

类型
字符串
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the NSSiriUsageDescription key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_KEY_NSStickerSharingLevel

Sticker Sharing Level

类型
列出的值之一
可选值
Messages · OS
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the NSStickerSharingLevel key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_KEY_NSSupportsLiveActivities

Supports Live Activities

类型
布尔值(YES 或 NO)
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the NSSupportsLiveActivities key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_KEY_NSVoIPUsageDescription

Privacy - VoIP Usage Description

类型
字符串
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the NSVoIPUsageDescription key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_KEY_OSBundleUsageDescription

Privacy - Driver Extension Usage Description

类型
字符串
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the OSBundleUsageDescription key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_KEY_UILaunchStoryboardName

Launch Screen Interface File Base Name

类型
字符串
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the UILaunchStoryboardName key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_KEY_UIMainStoryboardFile

UIKit Main Storyboard File Base Name

类型
字符串
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the UIMainStoryboardFile key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_KEY_UIRequiresFullScreen

Requires Full Screen

类型
布尔值(YES 或 NO)
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the UIRequiresFullScreen key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_KEY_UIStatusBarHidden

Status Bar Initially Hidden

类型
布尔值(YES 或 NO)
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the UIStatusBarHidden key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_KEY_UIStatusBarStyle

Status Bar Style

类型
列出的值之一
可选值
UIStatusBarStyleBlackOpaque · UIStatusBarStyleBlackTranslucent · UIStatusBarStyleDarkContent · UIStatusBarStyleDefault · UIStatusBarStyleLightContent
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the UIStatusBarStyle key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_KEY_UISupportsDocumentBrowser

Supports Document Browser

类型
布尔值(YES 或 NO)
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the UISupportsDocumentBrowser key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_KEY_UIUserInterfaceStyle

User Interface Style

类型
列出的值之一
可选值
Automatic · Dark · Light
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the UIUserInterfaceStyle key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_KEY_WKRunsIndependentlyOfCompanionApp

App Can Run Independently of Companion iPhone App

类型
布尔值(YES 或 NO)
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the WKRunsIndependentlyOfCompanionApp key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_KEY_WKWatchOnly

App is Available Only on Apple Watch

类型
布尔值(YES 或 NO)
When GENERATE_INFOPLIST_FILE is enabled, sets the value of the WKWatchOnly key in the Info.plist file to the value of this build setting.
Apple 页面

INFOPLIST_OUTPUT_FORMAT

Info.plist Output Encoding

类型
列出的值之一
可选值
XML · binary · same-as-input
默认值
same-as-input
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.
Apple 页面

INFOPLIST_PREFIX_HEADER

Info.plist Preprocessor Prefix File

类型
字符串
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.
Apple 页面

INFOPLIST_PREPROCESSOR_DEFINITIONS

Info.plist Preprocessor Definitions

类型
字符串列表
Space-separated list of preprocessor macros of the form foo or foo=bar. These macros are used when preprocessing the Info.plist file.
Apple 页面

INSTALLHDRS_COPY_PHASE

Perform Copy Files Phases During `installhdrs`

类型
布尔值(YES 或 NO)
默认值
NO
Specifies whether the target’s Copy Files build phases are executed in installhdr builds.
Apple 页面

INSTALLHDRS_SCRIPT_PHASE

Perform Shell Script Phases During `installhdrs`

类型
布尔值(YES 或 NO)
默认值
NO
Specifies whether the target’s Run Script build phases are executed in installhdr builds. See ACTION for details on installhdr builds.
Apple 页面

INSTALL_DIR

INSTALL_DIR

类型
路径
默认值
$(DSTROOT)$(INSTALL_PATH)
Identifies the directory in the developer’s filesystem into which the installed product is placed.
Apple 页面

INSTALL_PATH

Installation Directory

类型
路径
The directory in which to install the build products. This path is prepended by the DSTROOT.
Apple 页面

INTENTS_CODEGEN_LANGUAGE

Intent Class Generation Language

类型
列出的值之一
可选值
Automatic · Objective-C · Swift
默认值
Automatic
The Source-code language to use for generated Intent class. By default “Automatic” will analyze your project to determine the correct language. Adjust this setting to explicitly select “Swift” or “Objective-C”.
Apple 页面

IS_MACCATALYST

Building for Mac Catalyst

类型
布尔值(YES 或 NO)
Indicates whether the target is building for Mac Catalyst. This build setting is intended for use in shell scripts and build setting composition and should be considered read-only.
Apple 页面

KEEP_PRIVATE_EXTERNS

Preserve Private External Symbols

类型
布尔值(YES 或 NO)
默认值
NO
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.
Apple 页面

LAUNCH_CONSTRAINT_PARENT

Launch Constraint Parent Process Plist

类型
字符串
A path to a plist representation of a Requirements Dictionary indicating the desired constraint on the parent of this binary.
Apple 页面

LAUNCH_CONSTRAINT_RESPONSIBLE

Launch Constraint Responsible Process Plist

类型
字符串
A path to a plist representation of a Requirements Dictionary indicating the desired constraint on the responsible process for this binary.
Apple 页面

LAUNCH_CONSTRAINT_SELF

Launch Constraint Process Plist

类型
字符串
A path to a plist representation of a Requirements Dictionary indicating the desired constraint on this binary.
Apple 页面

LD_DEPENDENCY_INFO_FILE

Path to Linker Dependency Info File

类型
路径
默认值
$(OBJECT_FILE_DIR_$(CURRENT_VARIANT))/$(CURRENT_ARCH)/$(PRODUCT_NAME)_dependency_info.dat
This setting defines the path to which the linker should emit information about what files it used as inputs and generated. Xcode uses this information for its dependency tracking. Setting the value of this setting to empty will disable passing this option to the linker.
Apple 页面

LD_DYLIB_ALLOWABLE_CLIENTS

Dynamic Library Allowable Clients

类型
字符串列表
This setting restricts the clients allowed to link a dylib by passing -allowable_client to the linker for each supplied value.
Apple 页面

LD_DYLIB_INSTALL_NAME

Dynamic Library Install Name

类型
字符串
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.
Apple 页面

LD_ENVIRONMENT

Dynamic Linker Environment

类型
字符串列表
This setting allows key=value pairs of dyld environment variables to be embedded in a generated executable as LC_DYLD_ENVIRONMENT load commands in order to supplement the environment in which the executable is launched, if allowed by the platform and its security environment.
Apple 页面

LD_EXPORT_SYMBOLS

Export Symbols

类型
布尔值(YES 或 NO)
默认值
YES
Export symbols from the binaries. Disabling this setting can be useful for binaries which have no API or plug-ins and thus need no symbol exports. [-no_exported_symbols]
Apple 页面

LD_GENERATE_MAP_FILE

Write Link Map File

类型
布尔值(YES 或 NO)
默认值
NO
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.
Apple 页面

LD_MAP_FILE_PATH

Path to Link Map File

类型
路径
默认值
$(TARGET_TEMP_DIR)/$(PRODUCT_NAME)-LinkMap-$(CURRENT_VARIANT)-$(CURRENT_ARCH).txt
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.
Apple 页面

LD_NO_PIE

Generate Position-Dependent Executable

类型
布尔值(YES 或 NO)
默认值
NO
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.
Apple 页面

LD_QUOTE_LINKER_ARGUMENTS_FOR_COMPILER_DRIVER

Quote Linker Arguments

类型
布尔值(YES 或 NO)
默认值
YES
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.
Apple 页面

LD_RUNPATH_SEARCH_PATHS

Runpath Search Paths

类型
字符串列表
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.
Apple 页面

LEXFLAGS

Other Lex Flags

类型
字符串列表
Space-separated list of additional flags to pass to lex. Be sure to backslash-escape any arguments that contain spaces or special characters, such as path names that may contain spaces. Use this setting if Xcode does not already provide UI for a lex flag.
Apple 页面

LEX_CASE_INSENSITIVE_SCANNER

Generate Case-Insensitive Scanner

类型
布尔值(YES 或 NO)
默认值
NO
Enabling this option causes lex to generate a case-insensitive scanner. The case of letters given in the lex input patterns will be ignored, and tokens in the input will be matched regardless of case. The matched text given in yytext will have the preserved case (for example, it will not be folded).
Apple 页面

LEX_INSERT_LINE_DIRECTIVES

Insert #line Directives

类型
布尔值(YES 或 NO)
默认值
YES
Enabling this option instructs lex to insert #line directives so error messages in the actions will be correctly located with respect to either the original lex input file (if the errors are due to code in the input file), or lex.yy.c (if the errors are lex’s fault). This option is enabled by default; disabling it passes a flag to lex to not insert #line directives.
Apple 页面

LEX_SUPPRESS_DEFAULT_RULE

Suppress Default Rule

类型
布尔值(YES 或 NO)
默认值
NO
Enabling this option causes the default rule (that unmatched scanner input is echoed to stdout) to be suppressed. If the scanner encounters input that does not match any of its rules, it aborts with an error. This option is useful for finding holes in a scanner’s rule set.
Apple 页面

LEX_SUPPRESS_WARNINGS

Suppress Warning Messages

类型
布尔值(YES 或 NO)
默认值
$(SUPPRESS_WARNINGS)
Enabling this option causes lex to suppress its warning messages.
Apple 页面

LIBRARY_LOAD_CONSTRAINT

Library Load Constraint Plist

类型
字符串
A path to a plist representation of a Requirements Dictionary that specifies the desired set of libraries that can be loaded by this process. Supported when building on macOS 14 or later.
Apple 页面

LIBRARY_SEARCH_PATHS

Library Search Paths

类型
路径列表
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.
Apple 页面

LINKER_DISPLAYS_MANGLED_NAMES

Display Mangled Names

类型
布尔值(YES 或 NO)
默认值
NO
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.
Apple 页面

LLVM_LTO

Link-Time Optimization

类型
列出的值之一
可选值
NO · YES · YES_THIN
默认值
NO
Enabling this setting allows optimization across file boundaries during linking. • No: Disabled. Do not use link-time optimization. • Monolithic Link-Time Optimization: This mode performs monolithic link-time optimization of binaries, combining all executable code into a single unit and running aggressive compiler optimizations. • Incremental Link-Time Optimization: This mode performs partitioned link-time optimization of binaries, inlining between compilation units and running aggressive compiler optimizations on each unit in parallel. This enables fast incremental builds and uses less memory than Monolithic LTO.
Apple 页面

LOCALIZED_STRING_CODE_COMMENTS

Localized Strings in Code Comments

类型
布尔值(YES 或 NO)
默认值
NO
When enabled, localizable strings wrapped in NSLocalizedString and similar string macros will be extracted even if commented out or wrapped in #if 0.
Apple 页面

LOCALIZED_STRING_MACRO_NAMES

Localized String Macro Names

类型
字符串列表
默认值
NSLocalizedString CFCopyLocalizedString
The base names for NSLocalizedString-like macros or functions used to produce localized strings in source code. The default base names of NSLocalizedString and CFCopyLocalizedString are always considered, even if this setting is empty.
Apple 页面

LOCALIZED_STRING_SWIFTUI_SUPPORT

Localized String SwiftUI Support

类型
布尔值(YES 或 NO)
默认值
YES
When enabled, literal strings in SwiftUI will be extracted during localization export. This will only extract string literals in Text() initializers, unless SWIFT_EMIT_LOC_STRINGS is also enabled.
Apple 页面

MACH_O_TYPE

Mach-O Type

类型
列出的值之一
可选值
mh_bundle · mh_dylib · mh_execute · mh_object · objectlib · staticlib
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 in Mach-O Programming Topics. • 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]
Apple 页面

MAPC_NO_WARNINGS

Suppress all mapc warnings

类型
布尔值(YES 或 NO)
默认值
NO
Compile .xcmappingmodel files into .cdm without reporting warnings.
Apple 页面

MARKETING_VERSION

Marketing Version

类型
字符串
This setting defines the user-visible version of the project. When GENERATE_INFOPLIST_FILE is enabled, sets the value of the CFBundleShortVersionString key in the Info.plist file to the value of this build setting.
Apple 页面

MARKETPLACES

Alternative Distribution - Marketplaces

类型
字符串列表
Enable overriding your app’s distributor identifier with a list of additional marketplace identifiers when running from Xcode.
Apple 页面

MERGEABLE_LIBRARY

Build Mergeable Library

类型
布尔值(YES 或 NO)
默认值
NO
For dynamic libraries and frameworks, links this target’s binary as a mergeable library which can be merged into the product of a target which depends on it if that target is configured to do so. This target will be linked as a mergeable library in release builds so it can be merged, but will instead be linked as a normal dynamic library to be reexported in debug builds. For other binary types, this setting has no effect. For more information on mergeable libraries, see Configuring your project to use mergeable libraries.
Apple 页面

MERGED_BINARY_TYPE

Create Merged Binary

类型
列出的值之一
可选值
automatic · manual · none
默认值
none
Use this setting to link the target’s binary by combining it with mergeable libraries it links against to create a single binary. Only applies to executables, dynamic libraries and frameworks. • When set to Automatic, this target’s immediate dependencies which build dynamic libraries or frameworks and are in its Link Binaries With Libraries will automatically be built as mergeable libraries and merged into this target’s binary during release builds, or reexported during debug builds. • When set to Manual, only immediate dependencies which have Build Mergeable Library explicitly enabled will be merged or reexported. For more information on mergeable libraries, see Configuring your project to use mergeable libraries.
Apple 页面

MODULEMAP_FILE

Module Map File

类型
字符串
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.
Apple 页面

MODULEMAP_PRIVATE_FILE

Private Module Map File

类型
字符串
This is the project-relative path to the LLVM module map file that defines the module structure for private headers.
Apple 页面

MODULES_FOLDER_PATH

MODULES_FOLDER_PATH

类型
路径
Specifies the directory that contains the product’s Clang module maps and Swift module content.
Apple 页面

MODULE_CACHE_DIR

MODULE_CACHE_DIR

类型
路径
默认值
$(DERIVED_DATA_DIR)/ModuleCache.noindex
Absolute path of folder in which compiler stores its cached modules—this cache is a performance improvement.
Apple 页面

MODULE_NAME

Module Identifier

类型
字符串
This is the identifier of the kernel module listed in the generated stub. This is only used when building kernel extensions.
Apple 页面

MODULE_START

Module Start Routine

类型
字符串
This defines the name of the kernel module start routine. This is only used when building kernel extensions.
Apple 页面

MODULE_STOP

Module Stop Routine

类型
字符串
This defines the name of the kernel module stop routine. This is only used when building kernel extensions.
Apple 页面

MODULE_VERIFIER_SUPPORTED_LANGUAGES

Supported Languages

类型
字符串列表
默认值
objective-c
Languages to verify the module, i.e. the languages supported for framework clients. Allowed values are ‘c’, ‘c++’, ‘objective-c’, ‘objective-c++’
Apple 页面

MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS

Supported Language Dialects

类型
字符串列表
Language dialects to verify the module, i.e. the language dialects supported for framework clients. Allowed values are ‘ansi’, ‘c89’, ‘gnu89’, ‘c99’, ‘gnu99’, ‘c11’, ‘gnu11’, ‘c17’, ‘gnu17’, ‘c23’, ‘gnu23’, ‘c++98’, ‘gnu++98’, ‘c++11’, ‘gnu++11’, ‘c++14’, ‘gnu++14’, ‘c++17’, ‘gnu++17’, ‘c++20’, ‘gnu++20’, ‘c++23’, ‘gnu++23’
Apple 页面

MODULE_VERSION

Module Version

类型
字符串
This is the version of the kernel module listed in the generated stub. This is only used when building kernel extensions.
Apple 页面

MOMC_NO_DELETE_RULE_WARNINGS

Suppress momc warnings for delete rules

类型
布尔值(YES 或 NO)
默认值
NO
Suppress managed object model compiler (momc) warnings for delete rules during the compilation of .xcdatamodel(d) files.
Apple 页面

MOMC_NO_INVERSE_RELATIONSHIP_WARNINGS

Suppress momc warnings on missing inverse relationships

类型
布尔值(YES 或 NO)
默认值
NO
Suppress managed object model compiler (momc) warnings from output on missing inverse relationships during the compilation of .xcdatamodel(d) files
Apple 页面

MOMC_NO_MAX_PROPERTY_COUNT_WARNINGS

Suppress momc warnings for entities with more than 100 properties

类型
布尔值(YES 或 NO)
默认值
NO
Suppress managed object model compiler (momc) warnings from output on entities with more than 100 properties during the compilation of .xcdatamodel(d) files.
Apple 页面

MOMC_NO_WARNINGS

Suppress all momc warnings

类型
布尔值(YES 或 NO)
默认值
NO
Suppress managed object model compiler (momc) warnings from output during the compilation of .xcdatamodel(d) files
Apple 页面

MOMC_SUPPRESS_INVERSE_TRANSIENT_ERROR

Suppress momc error on transient inverse relationships

类型
布尔值(YES 或 NO)
默认值
NO
Suppress managed object model compiler (momc) warnings from output on transient inverse relationships during the compilation of .xcdatamodel(d) files. This is only intended to be used on 10.4.x created models that compiled properly in 10.4.x before the error was introduced in 10.5
Apple 页面

MTL_ENABLE_DEBUG_INFO

Produce Debugging Information

类型
列出的值之一
可选值
INCLUDE_SOURCE · NO · YES
默认值
NO
Debugging information is required for shader debugging and profiling.
Apple 页面

MTL_ENABLE_INDEX_STORE

Enable Index-While-Building Functionality (Metal)

类型
布尔值(YES 或 NO)
默认值
$(INDEX_ENABLE_DATA_STORE)
Control whether the compiler should emit index data while building.
Apple 页面

MTL_ENABLE_MODULES

Enable Modules (Metal)

类型
列出的值之一
可选值
NO · STDLIB · YES
默认值
STDLIB
Enable the use of modules. Headers are imported as semantic modules instead of raw headers. This can result in faster builds and project indexing. • All: Enable for all headers. • Standard library: Enable for standard library headers only (default). • None: Disable the feature.
Apple 页面

MTL_FAST_MATH

Enable Fast Math

类型
布尔值(YES 或 NO)
默认值
YES
Enable optimizations for floating-point arithmetic that may violate the IEEE 754 standard and disable the high precision variant of math functions for single and half precision floating-point.
Apple 页面

MTL_HEADER_SEARCH_PATHS

Header Search Paths

类型
路径列表
This is a list of paths to folders to be searched by the compiler for included or imported header files when compiling Metal. Paths are delimited by whitespace, so any paths with spaces in them need to be properly quoted. [MTL_HEADER_SEARCH_PATHS, -I]
Apple 页面

MTL_IGNORE_WARNINGS

Ignore Warnings

类型
布尔值(YES 或 NO)
默认值
NO
Enabling this option causes all warnings to be ignored. [MTL_IGNORE_WARNINGS, -W]
Apple 页面

MTL_LANGUAGE_REVISION

Metal Language Revision

类型
列出的值之一
可选值
Metal11 · Metal12 · Metal20 · Metal21 · Metal22 · Metal23 · Metal24 · Metal30 · Metal31 · Metal32 · Metal40 · Metal41 · UseDeploymentTarget · iOSMetal10
默认值
UseDeploymentTarget
Determine the language revision to use. A value for this option must be provided.
Apple 页面

MTL_MATH_FP32_FUNCTIONS

Single-Precision Floating Point Functions

类型
列出的值之一
可选值
FAST · PRECISE · UseLanguageDefault
默认值
$(MTL_MATH_FP32_FUNCTIONS_derived_$(MTL_FAST_MATH):default=FAST)
Controls default math functions for single precision floating-point
Apple 页面

MTL_MATH_MODE

Math Mode

类型
列出的值之一
可选值
FAST · RELAXED · SAFE · UseLanguageDefault
默认值
$(MTL_MATH_MODE_derived_$(MTL_FAST_MATH):default=FAST)
Controls floating-point optimizations
Apple 页面

MTL_OPTIMIZATION_LEVEL

Optimization Level

类型
列出的值之一
可选值
default · s
默认值
default
Optimization level for the Metal compiler. • Default: Optimize for program performance [-O2]. This setting applies a moderate level of optimization that enables most optimizations. • Size: Like default, with extra optimizations to reduce code size [-Os]. This setting limits optimizations that increase code size, such as loop unrolling and function inlining, and enables other optimizations for size. It may reduce compile time and compiler memory in cases where optimizing for performance results in very large code.
Apple 页面

MTL_TREAT_WARNINGS_AS_ERRORS

Treat Warnings as Errors

类型
布尔值(YES 或 NO)
默认值
NO
Enabling this option causes all warnings to be treated as errors. [MTL_TREAT_WARNINGS_AS_ERRORS, -Werror]
Apple 页面

NATIVE_ARCH

NATIVE_ARCH

类型
字符串
Identifies the architecture on which the build is being performed.
Apple 页面

OBJECT_FILE_DIR

OBJECT_FILE_DIR

类型
路径
Partially identifies the directory into which variant object files are placed. The complete specification is computed using the variants of this build setting.
Apple 页面

OBJROOT

Intermediate Build Files Path

类型
路径
默认值
$(SYMROOT)
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.
Apple 页面

ONLY_ACTIVE_ARCH

Build Active Architecture Only

类型
布尔值(YES 或 NO)
默认值
NO
If enabled, only the active architecture is built. This setting will be ignored when building with a run destination which does not define a specific architecture, such as a ‘Generic Device’ run destination, or if the ‘Override Architectures’ scheme option is set to ‘Match Run Destination’ or ‘Universal’.
Apple 页面

ON_DEMAND_RESOURCES_PREFETCH_ORDER

On Demand Resources Prefetch Order

类型
字符串列表
Once your app is installed, this defined a set of On Demand Resources tags that should be downloaded. These tags are downloaded after the initial installation of your application, and will be downloaded in the order the tags provided in the list from first to last.
Apple 页面

OPENCL_ARCHS

OpenCL Architectures

类型
字符串
默认值
i386 x86_64 gpu_32 gpu_64
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.
Apple 页面

OPENCL_AUTO_VECTORIZE_ENABLE

Auto-vectorizer

类型
布尔值(YES 或 NO)
默认值
YES
Auto-vectorizes the OpenCL kernels for the CPU. This setting takes effect only for the CPU. This makes it possible to write a single kernel that is portable and performant across CPUs and GPUs.
Apple 页面

OPENCL_COMPILER_VERSION

OpenCL Compiler Version

类型
列出的值之一
可选值
CL1.1 · CL1.2
默认值
CL1.1
The OpenCL C compiler version supported by the platform.
Apple 页面

OPENCL_DENORMS_ARE_ZERO

Flush denorms to zero

类型
布尔值(YES 或 NO)
默认值
NO
This option controls how single precision and double precision denormalized numbers are handled. If specified as a build option, the single precision denormalized numbers may be flushed to zero; double precision denormalized numbers may also be flushed to zero if the optional extension for double precision is supported. This is intended to be a performance hint and the OpenCL compiler can choose not to flush denorms to zero if the device supports single precision (or double precision) denormalized numbers. This option is ignored for single precision numbers if the device does not support single precision denormalized numbers, for example, CL_FP_DENORM bit is not set in CL_DEVICE_SINGLE_FP_CONFIG. This option is ignored for double precision numbers if the device does not support double precision or if it does support double precision but not double precision denormalized numbers, for example, CL_FP_DENORM bit is not set in CL_DEVICE_DOUBLE_FP_CONFIG. This flag only applies for scalar and vector single precision floating-point variables and computations on these floating-point variables inside a program. It does not apply to reading from or writing to image objects.
Apple 页面

OPENCL_DOUBLE_AS_SINGLE

Double as single

类型
布尔值(YES 或 NO)
默认值
NO
Treat double precision floating-point expression as a single precision floating-point expression. This option is available for GPUs only.
Apple 页面

OPENCL_FAST_RELAXED_MATH

Relax IEEE Compliance

类型
布尔值(YES 或 NO)
默认值
NO
This allows optimizations for floating-point arithmetic that may violate the IEEE 754 standard and the OpenCL numerical compliance requirements defined in in section 7.4 for single-precision floating-point, section 9.3.9 for double-precision floating-point, and edge case behavior in section 7.5 of the OpenCL 1.1 specification. This is intended to be a performance optimization. This option causes the preprocessor macro __FAST_RELAXED_MATH__ to be defined in the OpenCL program.
Apple 页面

OPENCL_MAD_ENABLE

Use MAD

类型
布尔值(YES 或 NO)
默认值
NO
Allow a * b + c to be replaced by a mad instruction. The mad computes a * b + c with reduced accuracy. For example, some OpenCL devices implement mad as truncate the result of a * b before adding it to c. This is intended to be a performance optimization.
Apple 页面

OPENCL_OPTIMIZATION_LEVEL

Optimization Level

类型
列出的值之一
可选值
0 · 1 · 2 · 3 · s
默认值
s
• None: Do not optimize. [-O0] With this setting, the compiler’s goal is to reduce the cost of compilation and to make debugging produce the expected results. Statements are independent: if you stop the program with a breakpoint between statements, you can then assign a new value to any variable or change the program counter to any other statement in the function and get exactly the results you would expect from the source code. • Fast: Optimizing compilation takes somewhat more time, and a lot more memory for a large function. [-O, -O1] With this setting, the compiler tries to reduce code size and execution time, without performing any optimizations that take a great deal of compilation time. In Apple’s compiler, strict aliasing, block reordering, and inter-block scheduling are disabled by default when optimizing. • Faster: The compiler performs nearly all supported optimizations that do not involve a space-speed tradeoff. [-O2] With this setting, the compiler does not perform loop unrolling or function inlining, or register renaming. As compared to the Fast setting, this setting increases both compilation time and the performance of the generated code. • Fastest: Turns on all optimizations specified by the Faster setting and also turns on function inlining and register renaming options. This setting may result in a larger binary. [-O3] • Fastest, smallest: Optimize for size. This setting enables all Faster optimizations that do not typically increase code size. It also performs further optimizations designed to reduce code size. [-Os]
Apple 页面

OPENCL_OTHER_BC_FLAGS

OpenCL Other Flags

类型
字符串列表
Space-separated list of additional flags to pass to the compiler. Be sure to backslash-escape any arguments that contain spaces or special characters, such as path names that may contain spaces. Use this setting if Xcode does not already provide UI for a particular compiler flag.
Apple 页面

ORDER_FILE

Order File

类型
路径
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.
Apple 页面

OSACOMPILE_EXECUTE_ONLY

Save as Execute-Only

类型
布尔值(YES 或 NO)
默认值
NO
Saves the output script in execute-only form; the script can be run, but cannot be opened in Script Editor or Xcode. With this option turned off, a user may see the original script source by opening the script.
Apple 页面

OTHER_CFLAGS

Other C Flags

类型
字符串列表
Space-separated list of additional flags to pass to the compiler for C and Objective-C files. Be sure to backslash-escape any arguments that contain spaces or special characters, such as path names that may contain spaces. Use this setting if Xcode does not already provide UI for a particular C or Objective-C compiler flag.
Apple 页面

OTHER_CPLUSPLUSFLAGS

Other C++ Flags

类型
字符串列表
默认值
$(OTHER_CFLAGS)
Space-separated list of additional flags to pass to the compiler for C++ and Objective-C++ files. Be sure to backslash-escape any arguments that contain spaces or special characters, such as path names that may contain spaces. Use this setting if Xcode does not already provide UI for a C++ or Objective-C++ compiler flag.
Apple 页面

OTHER_IIG_CFLAGS

Other IIG C Flags

类型
字符串列表
Space-separated list of additional flags to pass to the iig invocation of clang. Be sure to backslash-escape any arguments that contain spaces or special characters, such as path names that may contain spaces. Use this setting if Xcode does not already provide UI for a particular iig flag
Apple 页面

OTHER_IIG_FLAGS

Other IIG Flags

类型
字符串列表
Space-separated list of additional flags to pass to the iig compiler. Be sure to backslash-escape any arguments that contain spaces or special characters, such as path names that may contain spaces. Use this setting if Xcode does not already provide UI for a particular iig flag
Apple 页面

OTHER_LDFLAGS

Other Linker Flags

类型
字符串列表
Options defined in this setting are passed to invocations of the linker.
Apple 页面

OTHER_LIBTOOLFLAGS

Other Librarian Flags

类型
字符串列表
Options defined in this setting are passed to all invocations of the archive librarian, which is used to generate static libraries.
Apple 页面

OTHER_MIGFLAGS

Other MiG Flags

类型
字符串列表
Space-separated list of additional flags to pass to mig. Be sure to backslash-escape any arguments that contain spaces or special characters, such as path names that may contain spaces. Use this setting if Xcode does not already provide UI for a mig flag.
Apple 页面

OTHER_OSACOMPILEFLAGS

Other OSACompile Flags

类型
字符串列表
Space-separated list of additional flags to pass to osacompile. Be sure to backslash-escape any arguments that contain spaces or special characters, such as path names that may contain spaces. Use this setting if Xcode does not already provide UI for a particular osacompile flag.
Apple 页面

OTHER_REZFLAGS

Other Rez Flags

类型
字符串列表
Space-separated list of additional flags to pass to the Rez compiler. Be sure to backslash-escape any arguments that contain spaces or special characters, such as path names that may contain spaces. Use this setting if Xcode does not already provide UI for a particular Rez flag.
Apple 页面

OTHER_TAPI_FLAGS

Other Text-Based InstallAPI Flags

类型
字符串列表
Options defined in this setting are passed to invocations of the Text-Based InstallAPI tool.
Apple 页面

PACKAGE_TYPE

PACKAGE_TYPE

类型
字符串
Uniform type identifier. Identifies the type of the product the target builds. Some products may be made up of a single binary or archive. Others may comprise several files, which are grouped under a single directory. These container directories are known as bundles.
Apple 页面

PLIST_FILE_OUTPUT_FORMAT

Property List Output Encoding

类型
列出的值之一
可选值
Binary · SameAsInput · XML · binary · same-as-input
默认值
same-as-input
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.
Apple 页面

PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR

Precompiled Header Uses Files From Build Directory

类型
布尔值(YES 或 NO)
默认值
YES
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.
Apple 页面

PROCESSED_INFOPLIST_PATH

PROCESSED_INFOPLIST_PATH

类型
路径
默认值
$(OBJECT_FILE_DIR)-$(CURRENT_VARIANT)/$(CURRENT_ARCH)/Processed-Info.plist
Path of the per-architecture, per-variant intermediate Info.plist after C preprocessing and/or variable expansion have been applied.
Apple 页面

PRODUCT_BUNDLE_IDENTIFIER

Product Bundle Identifier

类型
字符串
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 (-). When GENERATE_INFOPLIST_FILE is enabled, sets the value of the CFBundleIdentifier key in the Info.plist file to the value of this build setting.
Apple 页面

PRODUCT_MODULE_NAME

Product Module Name

类型
字符串
默认值
$(PRODUCT_NAME:c99extidentifier)
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.
Apple 页面

PRODUCT_NAME

Product Name

类型
字符串
This is the basename of the product generated by the target. When GENERATE_INFOPLIST_FILE is enabled, sets the value of the CFBundleName key in the Info.plist file to the value of this build setting.
Apple 页面

PROJECT_TEMP_DIR

PROJECT_TEMP_DIR

类型
路径
默认值
$(PROJECT_TEMP_ROOT)/$(PROJECT_NAME).build
Identifies the directory in which the project’s intermediate build files are placed. This directory is shared between all the targets defined by the project. Run Script build phases should generate intermediate build files in the directory identified by DERIVED_FILE_DIR, not the location this build setting specifies.
Apple 页面

PROVISIONING_PROFILE_SPECIFIER

Provisioning Profile

类型
字符串
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.
Apple 页面

REMOVE_CVS_FROM_RESOURCES

REMOVE_CVS_FROM_RESOURCES

类型
布尔值(YES 或 NO)
默认值
YES
Specifies whether to remove CVS directories from bundle resources when they are copied.
Apple 页面

REMOVE_GIT_FROM_RESOURCES

REMOVE_GIT_FROM_RESOURCES

类型
布尔值(YES 或 NO)
默认值
YES
Specifies whether to remove .git directories from bundle resources when they are copied.
Apple 页面

REMOVE_HG_FROM_RESOURCES

REMOVE_HG_FROM_RESOURCES

类型
布尔值(YES 或 NO)
默认值
YES
Specifies whether to remove .hg directories from bundle resources when they are copied.
Apple 页面

REMOVE_SVN_FROM_RESOURCES

REMOVE_SVN_FROM_RESOURCES

类型
布尔值(YES 或 NO)
默认值
YES
Specifies whether to remove SVN directories from bundle resources when they are copied.
Apple 页面

RESMERGER_SOURCES_FORK

File Fork of Binary Sources

类型
列出的值之一
可选值
auto · data · resource
默认值
auto
Determines whether ResMerger treats binary input files as data-fork hosted or resource-fork hosted, or whether it automatically examines each input file.
Apple 页面

RETAIN_RAW_BINARIES

RETAIN_RAW_BINARIES

类型
布尔值(YES 或 NO)
默认值
$(INSTALLED_PRODUCT_ASIDES)
Specifies whether to keep copies of unstripped binaries available.
Apple 页面

REZ_COLLECTOR_DIR

REZ_COLLECTOR_DIR

类型
路径
默认值
$(TARGET_TEMP_DIR)/ResourceManagerResources
Specifies the directory in which the collected Resource Manager resources generated by ResMerger are stored before they are added to the product.
Apple 页面

REZ_OBJECTS_DIR

REZ_OBJECTS_DIR

类型
路径
默认值
$(REZ_COLLECTOR_DIR)/Objects
Specifies the directory in which compiled Resource Manager resources generated by Rez are stored before they are collected using ResMerger.
Apple 页面

REZ_PREFIX_FILE

Rez Prefix File

类型
路径
Implicitly include the named file on the command line for each Rez file compiled. The path given should either be a project relative path or an absolute path.
Apple 页面

REZ_RESOLVE_ALIASES

Resolve Aliases

类型
列出的值之一
可选值
Always · Includes · Never · Outputs
默认值
Always
Enables aliases to be unresolved or conditionally resolved. The default is to resolve aliases always.
Apple 页面

REZ_SCRIPT_TYPE

Rez Script Type

类型
列出的值之一
可选值
Japanese · Korean · Roman · SimpChinese · TradChinese
默认值
Roman
Enables the recognition of a specific 2-byte character script identifier to use when compiling resource manager resources. This allows for 2-byte characters in strings to be handled as indivisible entities. The default language is Roman, which specifies 1-byte character sets.
Apple 页面

REZ_SEARCH_PATHS

Rez Search Paths

类型
路径列表
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.
Apple 页面

REZ_SHOW_DEBUG_OUTPUT

Show Diagnostic Output

类型
布尔值(YES 或 NO)
默认值
NO
Enabling this option causes version and progress information to be written when compiling resource manager resources.
Apple 页面

RUNTIME_EXCEPTION_ALLOW_JIT

Allow JIT

类型
布尔值(YES 或 NO)
默认值
NO
A Boolean value that indicates whether the app may create writable and executable memory using the MAP_JIT flag.
Apple 页面

RUN_CLANG_STATIC_ANALYZER

Analyze During ‘Build’

类型
布尔值(YES 或 NO)
默认值
NO
Activating this setting will cause Xcode to run the Clang static analysis tool on qualifying source files during every build.
Apple 页面

SCAN_ALL_SOURCE_FILES_FOR_INCLUDES

Scan All Source Files for Includes

类型
布尔值(YES 或 NO)
默认值
NO
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.
Apple 页面

SDKROOT

Base SDK

类型
路径
默认值
$(SDKROOT)
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.
Apple 页面

SECTORDER_FLAGS

Symbol Ordering Flags

类型
字符串列表
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.
Apple 页面

SEPARATE_SYMBOL_EDIT

Separately Edit Symbols

类型
布尔值(YES 或 NO)
默认值
NO
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.
Apple 页面

SHARED_PRECOMPS_DIR

Precompiled Headers Cache Path

类型
路径
默认值
$(OBJROOT)/SharedPrecompiledHeaders
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.
Apple 页面

SKIP_INSTALL

Skip Install

类型
布尔值(YES 或 NO)
默认值
NO
If enabled, don’t install built products even if deployment locations are active.
Apple 页面

SKIP_MERGEABLE_LIBRARY_BUNDLE_HOOK

Skip Mergeable Library Bundle Hook

类型
布尔值(YES 或 NO)
默认值
NO
For mergeable libraries, skips adding a hook into the library’s resource bundle. This will prevent Bundle(for:) from returning this library’s resource bundle. For more information on mergeable libraries, see Configuring your project to use mergeable libraries.
Apple 页面

SRCROOT

SRCROOT

类型
路径
默认值
.
Identifies the directory containing the target’s source files.
Apple 页面

STRINGSDATA_DIR

STRINGSDATA_DIR

类型
路径
默认值
$(OBJECT_FILE_DIR_$(CURRENT_VARIANT))/$(CURRENT_ARCH)
The location to write .stringsdata files to when SWIFT_EMIT_LOC_STRINGS is enabled.
Apple 页面

STRINGSDATA_ROOT

STRINGSDATA_ROOT

类型
路径
默认值
$(TARGET_TEMP_DIR)
The location to traverse and collect .stringsdata files from when exporting for localization.
Apple 页面

STRINGS_FILE_INFOPLIST_RENAME

Adjust Strings File Names for Info.plist

类型
布尔值(YES 或 NO)
默认值
YES
If enabled, renames .strings files whose basename matches that of the target’s Info.plist file, to InfoPlist.strings in the built product.
Apple 页面

STRINGS_FILE_OUTPUT_ENCODING

Strings File Output Encoding

类型
列出的值之一
可选值
UTF-16 · UTF-8 · binary
默认值
UTF-16
Specify the output encoding to be used for Strings files - the default is UTF-16. The value can be either an NSStringEncoding, such as one of the numeric values recognized by NSString, or an IANA character set name as understood by CFString. It is recommended that the source file be in UTF-8 encoding, which is the default encoding for standard strings files, and Xcode will automatically process it to the output encoding. Processing will fail if the file cannot be converted to the specified encoding.
Apple 页面

STRIPFLAGS

Additional Strip Flags

类型
字符串列表
Additional flags to be passed when stripping the linked product of the build.
Apple 页面

STRIP_INSTALLED_PRODUCT

Strip Linked Product

类型
布尔值(YES 或 NO)
默认值
YES
If enabled, the linked product of the build will be stripped of symbols when performing deployment postprocessing.
Apple 页面

STRIP_PNG_TEXT

Remove Text Metadata From PNG Files

类型
布尔值(YES 或 NO)
默认值
YES
Metadata in the form of text chunks in PNG files will be removed to reduce their footprint on disk.
Apple 页面

STRIP_STYLE

Strip Style

类型
列出的值之一
可选值
all · debugging · non-global
默认值
all
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]
Apple 页面

STRIP_SWIFT_SYMBOLS

Strip Swift Symbols

类型
布尔值(YES 或 NO)
默认值
YES
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.
Apple 页面

SUPPORTED_PLATFORMS

Supported Platforms

类型
字符串列表
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.
Apple 页面

SUPPORTS_TEXT_BASED_API

Supports Text-Based InstallAPI

类型
布尔值(YES 或 NO)
默认值
NO
Enable to indicate that the target supports Text-Based InstallAPI, which will enable its generation during install builds.
Apple 页面

SUPPORTS_XR_DESIGNED_FOR_IPHONE_IPAD

Show Apple Vision (Designed for iPhone & iPad) Destination

类型
布尔值(YES 或 NO)
默认值
YES
Show the Apple Vision (Designed for iPhone) and Apple Vision (Designed for iPad) destinations.
Apple 页面

SWIFT_APPROACHABLE_CONCURRENCY

Approachable Concurrency

类型
布尔值(YES 或 NO)
默认值
NO
Enables upcoming features that aim to provide a more approachable path to Swift Concurrency: DisableOutwardActorInference, GlobalActorIsolatedTypesUsability, InferIsolatedConformances, InferSendableFromCaptures, and NonisolatedNonsendingByDefault.
Apple 页面

SWIFT_BRIDGING_HEADER_IS_INTERNAL

Bridging Header is Internal to the Module

类型
布尔值(YES 或 NO)
默认值
NO
When there is a bridging header, this setting indicates whether the contents of that bridging header should be imported as-if they came from an internal import. This is necessary when using bridging headers with Swift modules that are imported into other modules.
Apple 页面

SWIFT_COMPILATION_MODE

Compilation Mode

类型
列出的值之一
可选值
singlefile · wholemodule
默认值
singlefile
This setting controls the way the Swift files in a module are rebuilt. • Incremental: Only rebuild the Swift source files in the module that are out of date, running multiple compiler processes as needed. • Whole Module: Always rebuild all Swift source files in the module, in a single compiler process.
Apple 页面

SWIFT_DEFAULT_ACTOR_ISOLATION

Default Actor Isolation

类型
列出的值之一
可选值
MainActor · nonisolated
默认值
nonisolated
Controls default actor isolation for unannotated code. When set to ‘MainActor’, @MainActor isolation will be inferred by default to mitigate false-positive data-race safety errors in sequential code.
Apple 页面

SWIFT_EMIT_LOC_STRINGS

Use Compiler to Extract Swift Strings

类型
布尔值(YES 或 NO)
默认值
NO
When enabled, the Swift compiler will be used to extract Swift string literal and interpolation LocalizedStringKey and LocalizationKey types during localization export.
Apple 页面

SWIFT_ENABLE_BARE_SLASH_REGEX

Bare Slash Regex Literals

类型
布尔值(YES 或 NO)
默认值
YES
Enables the use of the forward slash syntax for regular-expressions (/.../). This is always enabled when in the Swift 6 language mode.
Apple 页面

SWIFT_ENABLE_EXPLICIT_MODULES

Explicitly Built Modules

类型
列出的值之一
可选值
NO · YES
Coordinates the build of the main module’s modular dependencies via explicit tasks scheduled by the build system.
Apple 页面

SWIFT_INSTALL_MODULE

Install Swift Module

类型
布尔值(YES 或 NO)
默认值
YES
For frameworks, install the Swift module so it can be accessed from Swift code using the framework.
Apple 页面

SWIFT_INSTALL_OBJC_HEADER

Install Generated Header

类型
布尔值(YES 或 NO)
默认值
YES
For frameworks, install the C++/Objective-C generated header describing bridged Swift types into the PUBLIC_HEADERS_FOLDER_PATH so they may be accessed from Objective-C or C++ code using the framework. Defaults to YES.
Apple 页面

SWIFT_OBJC_INTERFACE_HEADER_NAME

Generated Header Name

类型
字符串
默认值
$(SWIFT_MODULE_NAME)-Swift.h
Name to use for the header that is generated by the Swift compiler for use in #import statements in Objective-C or C++.
Apple 页面

SWIFT_OBJC_INTEROP_MODE

C++ and Objective-C Interoperability

类型
列出的值之一
可选值
objc · objcxx
默认值
objc
Determines whether Swift can interoperate with C++ in addition to Objective-C.
Apple 页面

SWIFT_OPTIMIZATION_LEVEL

Optimization Level

类型
列出的值之一
可选值
-O · -Onone · -Osize
默认值
-O
• None: Compile without any optimization. [-Onone] • Optimize for Speed: [-O] • Optimize for Size: [-Osize] • Whole Module Optimization: [-O -whole-module-optimization]
Apple 页面

SWIFT_PACKAGE_NAME

Package Access Identifier

类型
字符串
An identifier that allows grouping of modules with access to symbols with a package access modifier.
Apple 页面

SWIFT_PRECOMPILE_BRIDGING_HEADER

Precompile Bridging Header

类型
布尔值(YES 或 NO)
默认值
YES
Generate a precompiled header for the Objective-C bridging header, if used, in order to reduce overall build times.
Apple 页面

SWIFT_REFLECTION_METADATA_LEVEL

Reflection Metadata Level

类型
列出的值之一
可选值
all · none · without-names
默认值
all
This setting controls the level of reflection metadata the Swift compiler emits. • All: Type information about stored properties of Swift structs and classes, Swift enum cases, and their names, are emitted into the binary for reflection and analysis in the Memory Graph Debugger. • Without Names: Only type information about stored properties and cases are emitted into the binary, with their names omitted. [-disable-reflection-names] • None: No reflection metadata is emitted into the binary. Accuracy of detecting memory issues involving Swift types in the Memory Graph Debugger will be degraded and reflection in Swift code may not be able to discover children of types, such as properties and enum cases. [-disable-reflection-metadata]
Apple 页面

SWIFT_STRICT_CONCURRENCY

Strict Concurrency Checking

类型
列出的值之一
可选值
complete · minimal · targeted
默认值
$(SWIFT_STRICT_CONCURRENCY_DEFAULT)
Enables strict concurrency checking to produce warnings for possible data races. This is always ‘complete’ when in the Swift 6 language mode and produces errors instead of warnings.
Apple 页面

SWIFT_STRICT_MEMORY_SAFETY

Strict Memory Safety

类型
列出的值之一
可选值
MIGRATE · NO · YES
默认值
NO
Enable strict memory safety checking. This will produce warnings for each use of an unsafe language construct or API that isn’t acknowledged with unsafe or @unsafe.
Apple 页面

SWIFT_SYSTEM_INCLUDE_PATHS

System Module Import Paths

类型
路径列表
默认值
$(SWIFT_SYSTEM_INCLUDE_PATHS)
A list of paths to be searched by the Swift compiler for additional system Swift modules. Warnings found in system modules will not be emitted.
Apple 页面

SWIFT_UPCOMING_FEATURE_CONCISE_MAGIC_FILE

Concise Magic File

类型
布尔值(YES 或 NO)
默认值
$(SWIFT_UPCOMING_FEATURE_6_0)
Changes #file to evaluate to a string literal of the format <module-name>/<file-name>, with the existing behavior preserved in a new #filePath. This is always enabled when in the Swift 6 language mode.
Apple 页面

SWIFT_UPCOMING_FEATURE_DEPRECATE_APPLICATION_MAIN

Deprecate Application Main

类型
布尔值(YES 或 NO)
默认值
$(SWIFT_UPCOMING_FEATURE_6_0)
Causes any use of @UIApplicationMain or @NSApplicationMain to produce a warning (use @main instead). This is always enabled when in the Swift 6 language mode and an error instead of a warning.
Apple 页面

SWIFT_UPCOMING_FEATURE_DISABLE_OUTWARD_ACTOR_ISOLATION

Disable Outward Actor Isolation Inference

类型
布尔值(YES 或 NO)
默认值
$(SETTING_DefaultValue_$(SWIFT_UPCOMING_FEATURE_6_0)_$(SWIFT_APPROACHABLE_CONCURRENCY))
Removes inferred actor isolation inference from property wrappers. This is always enabled when in the Swift 6 language mode.
Apple 页面

SWIFT_UPCOMING_FEATURE_FORWARD_TRAILING_CLOSURES

Forward Trailing Closures

类型
布尔值(YES 或 NO)
默认值
$(SWIFT_UPCOMING_FEATURE_6_0)
Updates trailing closures to be evaluated such that arguments are matched forwards instead of backwards. This is always enabled when in the Swift 6 language mode.
Apple 页面

SWIFT_UPCOMING_FEATURE_GLOBAL_ACTOR_ISOLATED_TYPES_USABILITY

Global-Actor-Isolated Types Usability

类型
布尔值(YES 或 NO)
默认值
$(SETTING_DefaultValue_$(SWIFT_UPCOMING_FEATURE_6_0)_$(SWIFT_APPROACHABLE_CONCURRENCY))
Enable new concurrency checking rules for global-actor-isolated types. This is always enabled when in the Swift 6 language mode.
Apple 页面

SWIFT_UPCOMING_FEATURE_GLOBAL_CONCURRENCY

Isolated Global Variables

类型
布尔值(YES 或 NO)
默认值
$(SWIFT_UPCOMING_FEATURE_6_0)
Adds a warning for global variables that are neither isolated to a global actor or are not both immutable and Sendable. This is always enabled when in the Swift 6 language mode and an error instead of a warning.
Apple 页面

SWIFT_UPCOMING_FEATURE_IMPORT_OBJC_FORWARD_DECLS

Import Objective-C Forward Declarations

类型
布尔值(YES 或 NO)
默认值
$(SWIFT_UPCOMING_FEATURE_6_0)
Synthesizes placeholder types to represent forward declared Objective-C interfaces and protocols. This is always enabled when in the Swift 6 language mode.
Apple 页面

SWIFT_UPCOMING_FEATURE_INFER_ISOLATED_CONFORMANCES

Infer Isolated Conformances

类型
列出的值之一
可选值
MIGRATE · NO · YES
默认值
$(SWIFT_APPROACHABLE_CONCURRENCY)
Infer conformances of global-actor isolated types as isolated to the same actor unless isolation is explicitly specified as nonisolated.
Apple 页面

SWIFT_UPCOMING_FEATURE_INFER_SENDABLE_FROM_CAPTURES

Infer Sendable for Methods and Key Path Literals

类型
布尔值(YES 或 NO)
默认值
$(SETTING_DefaultValue_$(SWIFT_UPCOMING_FEATURE_6_0)_$(SWIFT_APPROACHABLE_CONCURRENCY))
Adds sendability inference for partial and unapplied methods, and allows specifying whether a key path literal is Sendable. This is always enabled when in the Swift 6 language mode.
Apple 页面

SWIFT_UPCOMING_FEATURE_ISOLATED_DEFAULT_VALUES

Isolated Default Values

类型
布尔值(YES 或 NO)
默认值
$(SWIFT_UPCOMING_FEATURE_6_0)
Adds actor isolation for default values, matching its enclosing function or stored property. This is always enabled when in the Swift 6 language mode.
Apple 页面

SWIFT_UPCOMING_FEATURE_REGION_BASED_ISOLATION

Region Based Isolation

类型
布尔值(YES 或 NO)
默认值
$(SWIFT_UPCOMING_FEATURE_6_0)
Enable passing non-Sendable values over isolation boundaries when there’s no possibility of concurrent access. This is always enabled when in the Swift 6 language mode.
Apple 页面

SWIFT_VERSION

Swift Language Version

类型
字符串
The language version used to compile the target’s Swift code.
Apple 页面

SYMROOT

Build Products Path

类型
路径
默认值
build
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.
Apple 页面

SYSTEM_FRAMEWORK_SEARCH_PATHS

System Framework Search Paths

类型
路径列表
默认值
$(SYSTEM_FRAMEWORK_SEARCH_PATHS)
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”.
Apple 页面

SYSTEM_HEADER_SEARCH_PATHS

System Header Search Paths

类型
路径列表
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”.
Apple 页面

TAPI_DEMANGLE

Text-Based InstallAPI Demangle Symbols

类型
布尔值(YES 或 NO)
默认值
YES
Display demangled symbols when building Text-Based InstallAPI.
Apple 页面

TAPI_ENABLE_PROJECT_HEADERS

Enable Text-Based InstallAPI for Project Headers

类型
布尔值(YES 或 NO)
默认值
NO
Include project-level headers when building Text-Based InstallAPI.
Apple 页面

TAPI_LANGUAGE

Text-Based InstallAPI Language Mode

类型
列出的值之一
可选值
c · c++ · objective-c · objective-c++
默认值
objective-c
Selects the language mode when building Text-Based InstallAPI.
Apple 页面

TAPI_LANGUAGE_STANDARD

Text-Based InstallAPI Language Dialect

类型
列出的值之一
可选值
c++0x · c++14 · c++17 · c++20 · c++23 · c++98 · c11 · c17 · c23 · c89 · c99 · compiler-default · gnu++0x · gnu++14 · gnu++17 · gnu++20 · gnu++23 · gnu++98 · gnu11 · gnu17 · gnu23 · gnu89 · gnu99
默认值
compiler-default
Selects the language dialect when building Text-Based InstallAPI.
Apple 页面

TAPI_VERIFY_MODE

Text-Based InstallAPI Verification Mode

类型
列出的值之一
可选值
ErrorsAndWarnings · ErrorsOnly · Pedantic
默认值
ErrorsOnly
Selects the level of warnings and errors to report when building Text-Based InstallAPI.
Apple 页面

TARGETED_DEVICE_FAMILY

Targeted Device Families

类型
列出的值之一
Comma-separated list of integers corresponding to device families supported by this target. The build system uses this information to set the correct value for the UIDeviceFamily key it adds to the target’s Info.plist file. Values inapplicable to the current platform will be removed automatically. This also drives the --target-device flag to actool, which determines the idioms selected during catalog compilation. Possible values include: • 1: iPhone, iPod touch • 2: iPad, Mac Catalyst using “Scaled to Match iPad” Interface • 3: Apple TV • 4: Apple Watch • 6: Mac Catalyst using “Optimize for Mac” Interface • 7: Apple Vision
Apple 页面

TARGET_BUILD_DIR

TARGET_BUILD_DIR

类型
路径
默认值
$(CONFIGURATION_BUILD_DIR)$(TARGET_BUILD_SUBPATH)
Identifies the root of the directory hierarchy that contains the product’s files (no intermediate build files). Run Script build phases that operate on product files of the target that defines them should use the value of this build setting, but Run Script build phases that operate on product files of other targets should use BUILT_PRODUCTS_DIR instead.
Apple 页面

TARGET_TEMP_DIR

TARGET_TEMP_DIR

类型
路径
默认值
$(CONFIGURATION_TEMP_DIR)/$(TARGET_NAME)$(TARGET_TEMP_DIR_SUFFIX).build
Identifies the directory containing the target’s intermediate build files. Run Script build phases should place intermediate files at the location indicated by DERIVED_FILE_DIR, not the directory identified by this build setting.
Apple 页面

TEST_HOST

Test Host

类型
字符串
Path to the executable into which a bundle of tests is injected. Only specify this setting if testing an application or other executable.
Apple 页面

TREAT_MISSING_SCRIPT_PHASE_OUTPUTS_AS_ERRORS

Treat Missing Script Phase Outputs as Errors

类型
布尔值(YES 或 NO)
默认值
NO
Enabling this option causes warnings about incremental build performance issues caused by script phases which are missing outputs, to be treated as errors.
Apple 页面

UNEXPORTED_SYMBOLS_FILE

Unexported Symbols File

类型
路径
A project-relative path to a file that lists the symbols not to export. See ld -exported_symbols_list for details on exporting symbols.
Apple 页面

USER_HEADER_SEARCH_PATHS

User Header Search Paths

类型
路径列表
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.
Apple 页面

USE_HEADERMAP

Use Header Maps

类型
布尔值(YES 或 NO)
默认值
YES
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.
Apple 页面

VALIDATE_PRODUCT

Validate Built Product

类型
布尔值(YES 或 NO)
默认值
NO
If enabled, perform validation checks on the product as part of the build process.
Apple 页面

VERBOSE_PBXCP

VERBOSE_PBXCP

类型
布尔值(YES 或 NO)
默认值
NO
Specifies whether the target’s Copy Files build phases generate additional information when copying files.
Apple 页面

VERSIONING_SYSTEM

Versioning System

类型
列出的值之一
可选值
apple-generic · apple-generic-hidden
Selects the process used for version-stamping generated files. • None: Use no versioning system. • Apple Generic: Use the current project version setting. [apple-generic] • Apple Generic (Hidden Symbols): Use the current project version setting with hidden-visibility symbols. [apple-generic-hidden]
Apple 页面

VERSION_INFO_BUILDER

Versioning Username

类型
字符串
默认值
$(USER)
This defines a reference to the user performing a build to be included in the generated Apple Generic Versioning stub. Defaults to the value of the USER environment variable.
Apple 页面

VERSION_INFO_EXPORT_DECL

Generated Versioning Variables

类型
字符串
This defines a prefix string for the version info symbol declaration in the generated Apple Generic Versioning stub. This can be used, for example, to add an optional export keyword to the version symbol declaration. This should rarely be changed.
Apple 页面

VERSION_INFO_FILE

Generated Versioning Source Filename

类型
字符串
默认值
$(PRODUCT_NAME)_vers.c
Used to specify a name for the source file that will be generated by Apple Generic Versioning and compiled into your product. By default, this is set to $(PRODUCT_NAME)_vers.c.
Apple 页面

VERSION_INFO_PREFIX

Versioning Name Prefix

类型
字符串
Used as a prefix for the name of the version info symbol in the generated versioning source file. If you prefix your exported symbols you will probably want to set this to the same prefix.
Apple 页面

VERSION_INFO_SUFFIX

Versioning Name Suffix

类型
字符串
Used as a suffix for the name of the version info symbol in the generated versioning source file. This is rarely used.
Apple 页面

WARNING_CFLAGS

Other Warning Flags

类型
字符串列表
Space-separated list of additional warning flags to pass to the compiler. Use this setting if Xcode does not already provide UI for a particular compiler warning flag.
Apple 页面

WRAPPER_EXTENSION

Wrapper Extension

类型
字符串
The extension used for product wrappers, which has a default value based on the product type.
Apple 页面

WRAPPER_NAME

WRAPPER_NAME

类型
路径
Specifies the filename, including the appropriate extension, of the product bundle.
Apple 页面

WRAPPER_SUFFIX

WRAPPER_SUFFIX

类型
字符串
Specifies the suffix of the product bundle name, including the character that separates the extension from the rest of the bundle name.
Apple 页面

YACCFLAGS

Other Yacc Flags

类型
字符串列表
Space-separated list of additional flags to pass to yacc. Be sure to backslash-escape any arguments that contain spaces or special characters, such as path names that may contain spaces. Use this setting if Xcode does not already provide UI for a yacc flag.
Apple 页面

YACC_GENERATED_FILE_STEM

Generated File Stem

类型
列出的值之一
可选值
InputFileStem · Standard
默认值
Standard
The file stem to use for the files generated by yacc. The files will be named <stem>.tab.c and <stem>.tab.h based on the value of this setting. The Standard (y) option will cause all yacc source files in the same target to produce the same output file, and it is not recommended for targets containing multiple yacc source files.
Apple 页面

YACC_GENERATE_DEBUGGING_DIRECTIVES

Generate Debugging Directives

类型
布尔值(YES 或 NO)
默认值
NO
Enabling this option changes the preprocessor directives generated by yacc so that debugging statements will be incorporated in the compiled code.
Apple 页面

YACC_INSERT_LINE_DIRECTIVES

Insert #line Directives

类型
布尔值(YES 或 NO)
默认值
YES
Enabling this option causes yacc to insert the #line directives in the generated code. The #line directives let the C compiler relate errors in the generated code to the user’s original code. If this option is disabled, #line directives specified by the user in the source file will still be retained.
Apple 页面

工作原理

  • •列表包含 Apple Build settings reference 里的每一个设置,附 Apple 的原文说明。类型、可选值和默认值取自 Xcode 27.1 自带的设置定义;检查器还认识约 1000 个 Xcode 定义了但没写进文档的名称,比如各平台的部署目标。
  • •检查器的每条规则都用 xcodebuild -showBuildSettings -xcconfig 实测过:名称里有短横线、点、空格或以数字开头,某行没有 “=”,用了 “+=”,条件不是 sdk、arch、config、variant、dialect 之一,或 #include 的文件找不到,xcodebuild 都会忽略整个文件。
  • •还会显示 Xcode 实际读到的值:“//” 即使在值中间也会开始注释,网址会变成 “https:”;末尾分号会被去掉;引号会保留。
  • •不认识的名称不算错误:.xcconfig 里常有自定义变量。只有名称与内置设置只差大小写或一两个字母时,才会提示。

它不做什么

  • •它不打开被 include 的文件,只把它们列出来,因为找不到时 Xcode 会忽略整个文件。
  • •它不计算项目、目标、配置各层合并后的最终值,那是 Xcode 构建时做的事。
  • •Apple 的说明是英文原文,与 Xcode 里一致。

常见问题

.xcconfig 里怎么写网址?
“//” 在一行的任何位置都会开始注释,所以 API_URL = https://example.com 读出来是 https:。写成 API_URL = https:/$()/example.com:空的 $() 在文件里把两个斜杠隔开,Xcode 读到的是 https://example.com。
为什么 Xcode 忽略了我的 .xcconfig 文件?
只要有一行解析不了就会这样:名称里有短横线或点、某行没有 =、用了 +=、条件写成 [cfg=Debug] 或 [SDK=iphoneos*],或者 #include 的文件找不到。xcodebuild 会提示 “Ignoring configuration file … because it could not be loaded” 并给出行号。可能不存在的文件请用 #include?。
怎么在设置后面追加,而不是覆盖?
值以 $(inherited) 开头,比如 OTHER_SWIFT_FLAGS = $(inherited) -DFEATURE。.xcconfig 没有 +=。
方括号里能用哪些条件?
Apple 文档写了 sdk、arch 和 config,如 OTHER_LDFLAGS[sdk=macosx*][arch=x86_64] = -lncurses。Xcode 27 还接受 variant 和 dialect。必须小写,不能有空格。
怎么看 Xcode 最终用的值?
运行 xcodebuild -showBuildSettings -scheme YourScheme,或在 Build Settings 标签里切到 Levels 视图,能看到从默认值到目标的每一层。

相关工具