Affects Version/s: None
Fix Version/s: None
The preprocessor macro DEBUG=1 defined in build-debug.xcconfig is overridden by Pods-[project name].debug.xcconfig when the project uses CocoaPods.
In a standard Cordova project build-debug.xcconfig defines the preprocessor macro DEBUG=1 as follows:
GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1
The phonegap-plugin-push, for example, override the GCC_PREPROCESSOR_DEFINITIONS with:
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 $(inherited)
GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1 $(inherited) PB_FIELD_32BIT=1
This issue can exist with other plugins that use CocoaPods.
$ cordova create test
$ cd test
$ cordova platform add ios
$ cordova plugin add phonegap-plugin-push
The $(inherited) does not work when xcconfig file includes other xcconfig files.
See https://github.com/CocoaPods/CocoaPods/issues/5785 .
As a result, the following code does not work in the debug build application.
NSLog(@"debug step 1");
Note that this issue will be improved in Xcode 10 in which the function of $(inherited) is improved.
See also https://stackoverflow.com/questions/1393987/how-to-append-values-in-xcconfig-variables