XCConfig not refreshing until Xcode is restarted

1.3k views Asked by At

I want to have a single target and several compilation schemes, and have some compiler definitions declared by a pre-action script of the schemes.

The pre-action script is generating a comp.xcconfig file which is #included by [Release|Debug]Config.xcconfig.

My generated comp.xcconfig holds this line:

GCC_PREPROCESSOR_DEFINITIONS = $(inherited) MY_TEST

My app include these lines:

#ifdef MY_TEST
    #error ye
#else
    #error oy
#endif

Compiling with the above configuration is resulting with error 'ye', as expected.

If I then change comp.xcconfig to be:

GCC_PREPROCESSOR_DEFINITIONS = $(inherited) MY_TEST1234

I'm still getting 'ye'. But if I quit Xcode and restart it, I'm getting the expected 'oy'.

My Question:

Is there a way to force Xcode to track xcconfig files for changes without the need to exit Xcode?

1

There are 1 answers

0
batu On BEST ANSWER

According to Xcode 8.3 beta release notes, this problem is fixed:

• Changes to xcconfig files no longer require restarting Xcode to take effect. (29805284)

http://adcdownload.apple.com/Developer_Tools/Xcode_8.3_beta/Release_Notes_for_Xcode_8.3_beta.pdf