[
https://issues.apache.org/jira/browse/CB-13033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16102778#comment-16102778
]
Shazron Abdullah commented on CB-13033:
---------------------------------------
Not sure of the source of the bug. However, if you are trying to set a build
property for Xcode, you should use the buildFlag flag or build.json buildFlag
property now:
https://cordova.apache.org/docs/en/latest/guide/platforms/ios/index.html#xcode-build-flags
> after_plugin_install hook's project.pbxproj modification is overwritten.
> ------------------------------------------------------------------------
>
> Key: CB-13033
> URL: https://issues.apache.org/jira/browse/CB-13033
> Project: Apache Cordova
> Issue Type: Bug
> Components: cordova-ios
> Environment: cordova cli version: 7.0.1
> [email protected]
> cordova-plugin-statusbar: 2.2.3
> cordova-plugin-whitelist: 1.3.2
> Reporter: Jongmin Ye
> Assignee: Shazron Abdullah
>
> Hello.
> I found this issue(https://issues.apache.org/jira/browse/CB-11258) on google,
> so I joined to let you know this is reproducible.
> I am doubting what I did is correct way because I am newbie, so I wrote all I
> did.
> # create project.
> {code:none}
> $cordova create testProject ...
> {code}
> # add plugins and ios platform
> {code:none}
> $cordova plugin add cordova-plugin-statusbar
> $cordova plugin add cordova-plugin-whitelist
> $cordova platform add ios
> {code}
> # add after_plugin_install hook to cordova-plugin-statusbar
> {code:XML}
> //add following line to
> {PROJ_HOME}/plugins/cordova-plugin-statusbar/plugin.xml
> <hook type="after_plugin_install" src="hooks/after_plugin_install.js" />
> {code}
> {code:JavaScript}
> //open
> {PROJ_HOME}/plugins/cordova-plugin-statusbar/hooks/after_plugin_install.js
> file and paste below codes.
> module.exports = function(context)
> {
> var fs = require('fs');
> var xcode = context.requireCordovaModule('xcode');
> var util = context.requireCordovaModule('cordova-lib/src/cordova/util');
> var ConfigParser =
> context.requireCordovaModule('cordova-lib/src/configparser/ConfigParser');
> var projectName = new
> ConfigParser(util.projectConfig(util.isCordova())).name();
> var projectPath = './platforms/ios/' + projectName +
> '.xcodeproj/project.pbxproj';
> var myProj = xcode.project(projectPath);
> myProj.parseSync(); myProj.updateBuildProperty('ENABLE_BITCODE', 'NO');
> fs.writeFileSync(projectPath, myProj.writeSync());
> console.log('✔ BITCODE disable');
> };
> {code}
> # remove and add ios platform
> {code:none}
> $cordova platform rm ios
> $cordova platform add ios
> {code}
> Then, you will find there is no *ENABLE_BITCODE* in the project.pbxproj file.
> I think only the last installed plugin's project.pbxproj modification is not
> overwritten.
> If I move above hook to cordova-plugin-whitelist, it works.
> If you need further info or I am doing wrong, please let me know.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]