Does SWIFT_ACTIVE_COMPILATION_CONDITIONS and inherited from included files work?

I have a Debug.xcconfig file:
Code Block Swift
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG


I have a AppUAT.Debug.xcconfig file that includes the above file and tries to use inheritance to only add a new value:
Code Block swift
#include "Debug.xcconfig"
SWIFT_ACTIVE_COMPILATION_CONDITIONS = $(inherited) UAT


Build Settings will only show:
Active Compilation Conditions == " UAT"

I put the quotes there to show $(inherited) is nil and the space is literally carried over from the space after $(inherited).

What am I doing wrong?



You are doing nothing wrong, but have probably hit a bug in Xcode dating back to Xcode 10.1 beta:

"
As of Xcode 10 beta 1, it seems the build settings editor GUI doesn't properly resolve the correct value for variables defined in the xcconfig files, and displays the values as if resolved with the old pre-Xcode 10 behavior.
"

Basically the settings really are being inherited correctly, but Xcode itself doesn't display them as if they are. This had me stumped today until I came across the above on stackoverflow /1393987/how-to-append-values-in-xcconfig-variables.

To be sure, actually do a #if DEBUG .... #endif section in your code and see if the enclosed code gets called at runtime.

It sure would be nice if this were fixed!
Does SWIFT_ACTIVE_COMPILATION_CONDITIONS and inherited from included files work?
 
 
Q