Build Configuration and Build Configuration File(.xcconfig)
It allows you to manage Build Settings
. It is actually what you see when reviewing Build Settings
and it's mirrors(like Signing
in Signing & Capabilities
)
Build Configuration(e.g. Release/Debug) -> Build Configuration File(.xcconfig) or some default config file
[Xcode structure]
Build Configuration
Actually Debug
/Release
Build Configurations are created by default
Create Build Configuration
You are able to create a new Build Configuration via duplicating an existing(Debug/Release) in Configurations
Editor -> Add Configuration -> Duplicate <configuration_name> Configuration -> Click plus button under configuration list
//Set a name - Experiments for example
Select Build Configuration
Scheme -> Info -> Build Configuration
Build Configuration File(.xcconfig)
Much more powerful feature is build configuration file
which you can assign for your configuration
File -> New -> File... -> Configuration Settings File
//Do not include it to any target
Project -> Info -> Configurations -> Build Configuration -> Target -> Build Configuration File
Please note that you are able to set Build Configuration File for Project and for Target. Depends on it Resolved variable will be set, also $(inherited)
[About] will be different
For example add name into Build Configuration File
PRODUCT_NAME = THE BEST NAME
The result you can find on Build Settings
CocoaPods
and Build Configuration File
project '<project_name>', '<scheme_name_1>' => :<build_congiguration_file_name_1>
//For example
project 'MyProject', 'debug' => :conf1, 'release' => :conf2
Build Configuration File(.xcconfig). You can use next syntax to add or override the parent parameters
#include "<path_to_xcconfig>"