XCConfig not refreshing until Xcode is restarted
Asked Answered
T

1

9

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?

Tema answered 20/12, 2016 at 21:37 Comment(2)
I'm having the same issue since Xcode 8.2.1 update. Please submit a bug report if you haven't yet.Nels
Resolved in Xcode 8.3 beta: "Changes to xcconfig files no longer require restarting Xcode to take effect. (29805284)"Nels
C
9

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

Chimp answered 25/1, 2017 at 6:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.