You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "takuya (JIRA)" <ji...@apache.org> on 2018/06/22 04:49:00 UTC
[jira] [Created] (CB-14160) The project with cocoapods override
the preprocessor macro.
takuya created CB-14160:
---------------------------
Summary: The project with cocoapods override the preprocessor macro.
Key: CB-14160
URL: https://issues.apache.org/jira/browse/CB-14160
Project: Apache Cordova
Issue Type: Bug
Components: cordova-ios
Reporter: takuya
Assignee: Suraj Pindoria
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
PB_NO_PACKED_STRUCTS=1
```
This issue can exist with other plugins that use CocoaPods.
*Reproduce Steps*
```
$ 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.
```
#ifdef DEBUG
NSLog(@"debug step 1");
#endif
```
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]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org