XCConfig not refreshing until Xcode is restarted

有些话、适合烂在心里 提交于 2019-12-21 09:13:32

问题


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:


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



来源:https://stackoverflow.com/questions/41251646/xcconfig-not-refreshing-until-xcode-is-restarted

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!