Example of Overriding build setting variables set on the Project or Target level by reassigning the value of that variable in a xcconfig file.
// Variable set in the project file, previous level
OTHER_LDFLAGS = -ObjC
// lib.xcconfig
OTHER_LDFLAGS = -framework Security
^ When compiling with this, the previous value of OTHER_LDFLAGS -ObjC
is going to be overridden by the new value -framework Security
.
Example of Inheriting build setting variables set on the Project or Target level by appending to the previous value of that variable in a xcconfig file. Think of $(inherited)
as a special variable that can be used to get the existing value of a variable so that assignment to same variable isn't destructive.
// Variable set in the project file, previous level
OTHER_LDFLAGS = -ObjC
// lib.xcconfig
OTHER_LDFLAGS = $(inherited) -framework Security
^ When compiling with this, the value of OTHER_LDFLAGS is going to be -ObjC -framework Security
.
Example found at https://pewpewthespells.com/blog/xcconfig_guide.html