xcconfig 配置正式环境测试环境自动切换

新建 xcconfig 文件夹

接着新建 3xcconfig 文件

接着配置一下

Config.xcconfig

1
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) URL='$(URL)'

Debug.xcconfig

1
2
3
4
5
#include "Config.xcconfig"

#include "Pods/Target Support Files/Pods-Demo/Pods-Demo.debug.xcconfig"

URL=@"测式"

Release.xcconfig

1
2
3
4
5
#include "Config.xcconfig"

#include "Pods/Target Support Files/Pods-Demo/Pods-Demo.debug.xcconfig"

URL=@"正式"