[jira] [Commented] (CB-14108) in config.xml increases config_munge count in ios.json and android.json.

2019-08-20 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/CB-14108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16911910#comment-16911910
 ] 

ASF subversion and git services commented on CB-14108:
--

Commit d1a10a9774ee8d0f5505c2aa746d4f2733060481 in cordova-common's branch 
refs/heads/master from エリス
[ https://gitbox.apache.org/repos/asf?p=cordova-common.git;h=d1a10a9 ]

revert: #24 CB-14108: fix incorrect count in config_munge (#89)

* Revert "CB-14108: fix incorrect count in config_munge in ios.json and 
android.json"

This reverts commit ce3801a184d34cc4c3ea08aeecd159227c6ae9e9.

* chore: eslint object-curly-spacing fix
* add CordovaError spec
* chore: fix eslint warnings for CordovaError spec
* fix CordovaError spec test
* chore: added additional AS project path check

>  in config.xml increases config_munge count in ios.json and 
> android.json.
> --
>
> Key: CB-14108
> URL: https://issues.apache.org/jira/browse/CB-14108
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common, cordova-lib
>Affects Versions: 8.0.0
>Reporter: Ken Naito
>Priority: Major
> Fix For: cordova-common@3.0.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> On both iOS and Android platforms, using  causes duplication in 
> the `ios.json` and `android.json` files, which could lead to extremely large 
> file sizes (and possibly unexpected behaviour?).
> For a Cordova 7.1/8.0 application, add the following to config.xml:
>  
> {code:java}
>
> 
> 
> 
> Please permit Camera!
> 
> 
> {code}
> Now run `cordova prepare`. The file `platforms/ios/ios.json` now contains the 
> below. Note the count is 1.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Run `cordova prepare` again. The platforms/ios/ios.json changes, increasing 
> the count to 2.
>   
> {code:java}
> "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Furthermore, if we change the text inside the `` in the `config.xml`:
> {code:java}
> 
> 
> 
> 
> This app uses Camera!
> 
> 
> {code}
> Then after running `cordova prepare`, there is now a second entry in 
> `platforms/ios/ios.json`, rather than replacing the existing entry.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> },
> {
>   "xml": "This app uses Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> This behaviour is the same for Android, and can be reproduced in the same 
> way, by adding something like the below to `config.xml`:
> {code:java}
> 
> 
> 
> 
> 
> 
> {code}



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-14108) in config.xml increases config_munge count in ios.json and android.json.

2019-08-20 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/CB-14108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16911911#comment-16911911
 ] 

ASF subversion and git services commented on CB-14108:
--

Commit d1a10a9774ee8d0f5505c2aa746d4f2733060481 in cordova-common's branch 
refs/heads/master from エリス
[ https://gitbox.apache.org/repos/asf?p=cordova-common.git;h=d1a10a9 ]

revert: #24 CB-14108: fix incorrect count in config_munge (#89)

* Revert "CB-14108: fix incorrect count in config_munge in ios.json and 
android.json"

This reverts commit ce3801a184d34cc4c3ea08aeecd159227c6ae9e9.

* chore: eslint object-curly-spacing fix
* add CordovaError spec
* chore: fix eslint warnings for CordovaError spec
* fix CordovaError spec test
* chore: added additional AS project path check

>  in config.xml increases config_munge count in ios.json and 
> android.json.
> --
>
> Key: CB-14108
> URL: https://issues.apache.org/jira/browse/CB-14108
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common, cordova-lib
>Affects Versions: 8.0.0
>Reporter: Ken Naito
>Priority: Major
> Fix For: cordova-common@3.0.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> On both iOS and Android platforms, using  causes duplication in 
> the `ios.json` and `android.json` files, which could lead to extremely large 
> file sizes (and possibly unexpected behaviour?).
> For a Cordova 7.1/8.0 application, add the following to config.xml:
>  
> {code:java}
>
> 
> 
> 
> Please permit Camera!
> 
> 
> {code}
> Now run `cordova prepare`. The file `platforms/ios/ios.json` now contains the 
> below. Note the count is 1.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Run `cordova prepare` again. The platforms/ios/ios.json changes, increasing 
> the count to 2.
>   
> {code:java}
> "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Furthermore, if we change the text inside the `` in the `config.xml`:
> {code:java}
> 
> 
> 
> 
> This app uses Camera!
> 
> 
> {code}
> Then after running `cordova prepare`, there is now a second entry in 
> `platforms/ios/ios.json`, rather than replacing the existing entry.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> },
> {
>   "xml": "This app uses Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> This behaviour is the same for Android, and can be reproduced in the same 
> way, by adding something like the below to `config.xml`:
> {code:java}
> 
> 
> 
> 
> 
> 
> {code}



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-14108) in config.xml increases config_munge count in ios.json and android.json.

2018-09-11 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-14108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16610937#comment-16610937
 ] 

ASF subversion and git services commented on CB-14108:
--

Commit ce3801a184d34cc4c3ea08aeecd159227c6ae9e9 in cordova-common's branch 
refs/heads/master from [~knaito]
[ https://gitbox.apache.org/repos/asf?p=cordova-common.git;h=ce3801a ]

CB-14108: fix incorrect count in config_munge in ios.json and android.json

* Fix to cordova prepare increment count at config_munge in platformJson
* Fix to cordova prepare when remove config-file case

>  in config.xml increases config_munge count in ios.json and 
> android.json.
> --
>
> Key: CB-14108
> URL: https://issues.apache.org/jira/browse/CB-14108
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common, cordova-lib
>Affects Versions: 8.0.0
>Reporter: Ken Naito
>Priority: Major
> Fix For: Master
>
>
> On both iOS and Android platforms, using  causes duplication in 
> the `ios.json` and `android.json` files, which could lead to extremely large 
> file sizes (and possibly unexpected behaviour?).
> For a Cordova 7.1/8.0 application, add the following to config.xml:
>  
> {code:java}
>
> 
> 
> 
> Please permit Camera!
> 
> 
> {code}
> Now run `cordova prepare`. The file `platforms/ios/ios.json` now contains the 
> below. Note the count is 1.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Run `cordova prepare` again. The platforms/ios/ios.json changes, increasing 
> the count to 2.
>   
> {code:java}
> "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Furthermore, if we change the text inside the `` in the `config.xml`:
> {code:java}
> 
> 
> 
> 
> This app uses Camera!
> 
> 
> {code}
> Then after running `cordova prepare`, there is now a second entry in 
> `platforms/ios/ios.json`, rather than replacing the existing entry.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> },
> {
>   "xml": "This app uses Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> This behaviour is the same for Android, and can be reproduced in the same 
> way, by adding something like the below to `config.xml`:
> {code:java}
> 
> 
> 
> 
> 
> 
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-14108) in config.xml increases config_munge count in ios.json and android.json.

2018-09-11 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-14108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16610936#comment-16610936
 ] 

ASF GitHub Bot commented on CB-14108:
-

dpogue closed pull request #24: CB-14108: fix incorrect count in config_munge 
in ios.json and android.json
URL: https://github.com/apache/cordova-common/pull/24
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/spec/ConfigChanges/ConfigChanges.spec.js 
b/spec/ConfigChanges/ConfigChanges.spec.js
index fe83c70..7f792d2 100644
--- a/spec/ConfigChanges/ConfigChanges.spec.js
+++ b/spec/ConfigChanges/ConfigChanges.spec.js
@@ -46,6 +46,9 @@ var ConfigParser = 
require('../../src/ConfigParser/ConfigParser');
 var xml = path.join(__dirname, '../fixtures/test-config.xml');
 var editconfig_xml = path.join(__dirname, '../fixtures/test-editconfig.xml');
 var configfile_xml = path.join(__dirname, '../fixtures/test-configfile.xml');
+var configfile0_xml = path.join(__dirname, '../fixtures/test-configfile0.xml');
+var configfile1_xml = path.join(__dirname, '../fixtures/test-configfile1.xml');
+var configfile2_xml = path.join(__dirname, '../fixtures/test-configfile2.xml');
 var cfg = new ConfigParser(xml);
 
 // TODO: dont do fs so much
@@ -385,6 +388,32 @@ describe('config-changes module', function () {
 expect(sdk.attrib['android:minSdkVersion']).toEqual('5');
 
expect(sdk.attrib['android:maxSdkVersion']).toBeUndefined();
 });
+it('should recover AndroidManifest after removing editconfig', 
function () {
+var editconfig_cfg = new ConfigParser(editconfig_xml);
+var platformJson = PlatformJson.load(plugins_dir, 
'android');
+var munger = new configChanges.PlatformMunger('android', 
temp, platformJson, pluginInfoProvider);
+
+// once add editconfig
+munger.add_config_changes(cfg, true).save_all();
+munger.add_config_changes(editconfig_cfg, true).save_all();
+
+var am_xml = new 
et.ElementTree(et.XML(fs.readFileSync(path.join(temp, 'AndroidManifest.xml'), 
'utf-8')));
+var sdk = am_xml.find('./uses-sdk');
+expect(sdk).toBeDefined();
+
expect(sdk.attrib['android:targetSdkVersion']).toEqual('23');
+expect(sdk.attrib['android:minSdkVersion']).toEqual('5');
+
expect(sdk.attrib['android:maxSdkVersion']).toBeUndefined();
+
+// should recover
+munger.add_config_changes(cfg, true).save_all();
+am_xml = new 
et.ElementTree(et.XML(fs.readFileSync(path.join(temp, 'AndroidManifest.xml'), 
'utf-8')));
+sdk = am_xml.find('./uses-sdk');
+expect(sdk).toBeDefined();
+
expect(sdk.attrib['android:targetSdkVersion']).toEqual('24');
+expect(sdk.attrib['android:minSdkVersion']).toEqual('14');
+
expect(sdk.attrib['android:maxSdkVersion']).toBeUndefined();
+
+});
 it('should append new children to XML document tree', function 
() {
 var configfile_cfg = new ConfigParser(configfile_xml);
 var platformJson = PlatformJson.load(plugins_dir, 
'android');
@@ -404,6 +433,47 @@ describe('config-changes module', function () {
 var am_file = fs.readFileSync(path.join(temp, 
'AndroidManifest.xml'), 'utf-8');
 
expect(am_file.indexOf('android:name="zoo"')).toBeLessThan(am_file.indexOf('android:name="com.foo.Bar"'));
 });
+// testing removing  tag in config.xml
+it('should recover AndroidManifest after removing config-file 
tag', function () {
+// add config-file same as previous
+var configfile_cfg = new ConfigParser(configfile_xml);
+var platformJson = PlatformJson.load(plugins_dir, 
'android');
+var munger = new configChanges.PlatformMunger('android', 
temp, platformJson, pluginInfoProvider);
+munger.add_config_changes(configfile_cfg, true).save_all();
+var am_xml = new 
et.ElementTree(et.XML(fs.readFileSync(path.join(temp, 'AndroidManifest.xml'), 
'utf-8')));
+var activity = 
am_xml.find('./application/activity[@android:name="com.foo.Bar"]');
+expect(activity).not.toBeNull();
+// add removing config-file
+var configfile0_cfg = new ConfigParser(configfile0_xml

[jira] [Commented] (CB-14108) in config.xml increases config_munge count in ios.json and android.json.

2018-09-05 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-14108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16605172#comment-16605172
 ] 

ASF GitHub Bot commented on CB-14108:
-

knight commented on issue #24: CB-14108: fix incorrect count in 
config_munge in ios.json and android.json
URL: https://github.com/apache/cordova-common/pull/24#issuecomment-418940100
 
 
   @janpio I see. I have updated the title.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


>  in config.xml increases config_munge count in ios.json and 
> android.json.
> --
>
> Key: CB-14108
> URL: https://issues.apache.org/jira/browse/CB-14108
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common, cordova-lib
>Affects Versions: 8.0.0
>Reporter: Ken Naito
>Priority: Major
> Fix For: Master
>
>
> On both iOS and Android platforms, using  causes duplication in 
> the `ios.json` and `android.json` files, which could lead to extremely large 
> file sizes (and possibly unexpected behaviour?).
> For a Cordova 7.1/8.0 application, add the following to config.xml:
>  
> {code:java}
>
> 
> 
> 
> Please permit Camera!
> 
> 
> {code}
> Now run `cordova prepare`. The file `platforms/ios/ios.json` now contains the 
> below. Note the count is 1.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Run `cordova prepare` again. The platforms/ios/ios.json changes, increasing 
> the count to 2.
>   
> {code:java}
> "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Furthermore, if we change the text inside the `` in the `config.xml`:
> {code:java}
> 
> 
> 
> 
> This app uses Camera!
> 
> 
> {code}
> Then after running `cordova prepare`, there is now a second entry in 
> `platforms/ios/ios.json`, rather than replacing the existing entry.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> },
> {
>   "xml": "This app uses Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> This behaviour is the same for Android, and can be reproduced in the same 
> way, by adding something like the below to `config.xml`:
> {code:java}
> 
> 
> 
> 
> 
> 
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-14108) in config.xml increases config_munge count in ios.json and android.json.

2018-09-05 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-14108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16604197#comment-16604197
 ] 

ASF GitHub Bot commented on CB-14108:
-

janpio commented on issue #24: CB-14108:
URL: https://github.com/apache/cordova-common/pull/24#issuecomment-418669373
 
 
   @knight Could you please summarize your changes in the PR title? Thanks.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


>  in config.xml increases config_munge count in ios.json and 
> android.json.
> --
>
> Key: CB-14108
> URL: https://issues.apache.org/jira/browse/CB-14108
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common, cordova-lib
>Affects Versions: 8.0.0
>Reporter: Ken Naito
>Priority: Major
> Fix For: Master
>
>
> On both iOS and Android platforms, using  causes duplication in 
> the `ios.json` and `android.json` files, which could lead to extremely large 
> file sizes (and possibly unexpected behaviour?).
> For a Cordova 7.1/8.0 application, add the following to config.xml:
>  
> {code:java}
>
> 
> 
> 
> Please permit Camera!
> 
> 
> {code}
> Now run `cordova prepare`. The file `platforms/ios/ios.json` now contains the 
> below. Note the count is 1.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Run `cordova prepare` again. The platforms/ios/ios.json changes, increasing 
> the count to 2.
>   
> {code:java}
> "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Furthermore, if we change the text inside the `` in the `config.xml`:
> {code:java}
> 
> 
> 
> 
> This app uses Camera!
> 
> 
> {code}
> Then after running `cordova prepare`, there is now a second entry in 
> `platforms/ios/ios.json`, rather than replacing the existing entry.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> },
> {
>   "xml": "This app uses Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> This behaviour is the same for Android, and can be reproduced in the same 
> way, by adding something like the below to `config.xml`:
> {code:java}
> 
> 
> 
> 
> 
> 
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-14108) in config.xml increases config_munge count in ios.json and android.json.

2018-05-30 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-14108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16496112#comment-16496112
 ] 

ASF GitHub Bot commented on CB-14108:
-

knight commented on issue #24: CB-14108:
URL: https://github.com/apache/cordova-common/pull/24#issuecomment-393405208
 
 
   Sorry, CB-13474, CB-13486 and CB-13514 are the issues in which multiple 
config-files and/or edit-configs compete each other.  (I.e. xml conflicting)
   However my PR does not resolve this kind of conflicting. 
   This PR is keeping necessary previous config-file settings and removing 
unnecessary previous config-file settings. Then applying the new config-file 
settings correctly. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


>  in config.xml increases config_munge count in ios.json and 
> android.json.
> --
>
> Key: CB-14108
> URL: https://issues.apache.org/jira/browse/CB-14108
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common, cordova-lib
>Affects Versions: 8.0.0
>Reporter: Ken Naito
>Priority: Major
> Fix For: Master
>
>
> On both iOS and Android platforms, using  causes duplication in 
> the `ios.json` and `android.json` files, which could lead to extremely large 
> file sizes (and possibly unexpected behaviour?).
> For a Cordova 7.1/8.0 application, add the following to config.xml:
>  
> {code:java}
>
> 
> 
> 
> Please permit Camera!
> 
> 
> {code}
> Now run `cordova prepare`. The file `platforms/ios/ios.json` now contains the 
> below. Note the count is 1.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Run `cordova prepare` again. The platforms/ios/ios.json changes, increasing 
> the count to 2.
>   
> {code:java}
> "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Furthermore, if we change the text inside the `` in the `config.xml`:
> {code:java}
> 
> 
> 
> 
> This app uses Camera!
> 
> 
> {code}
> Then after running `cordova prepare`, there is now a second entry in 
> `platforms/ios/ios.json`, rather than replacing the existing entry.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> },
> {
>   "xml": "This app uses Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> This behaviour is the same for Android, and can be reproduced in the same 
> way, by adding something like the below to `config.xml`:
> {code:java}
> 
> 
> 
> 
> 
> 
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-14108) in config.xml increases config_munge count in ios.json and android.json.

2018-05-30 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-14108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16496107#comment-16496107
 ] 

ASF GitHub Bot commented on CB-14108:
-

knight commented on issue #24: CB-14108:
URL: https://github.com/apache/cordova-common/pull/24#issuecomment-393405208
 
 
   Sorry, CB-13474, CB-13486 and CB-13514 are the issues in which multiple 
config-files and/or edit-configs compete each other.  (I.e. xml conflicting)
   However my PR does not resolve this kind of conflicting. 
   This PR is removing previous config-file settings and applying the new 
config-file settings correctly. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


>  in config.xml increases config_munge count in ios.json and 
> android.json.
> --
>
> Key: CB-14108
> URL: https://issues.apache.org/jira/browse/CB-14108
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common, cordova-lib
>Affects Versions: 8.0.0
>Reporter: Ken Naito
>Priority: Major
> Fix For: Master
>
>
> On both iOS and Android platforms, using  causes duplication in 
> the `ios.json` and `android.json` files, which could lead to extremely large 
> file sizes (and possibly unexpected behaviour?).
> For a Cordova 7.1/8.0 application, add the following to config.xml:
>  
> {code:java}
>
> 
> 
> 
> Please permit Camera!
> 
> 
> {code}
> Now run `cordova prepare`. The file `platforms/ios/ios.json` now contains the 
> below. Note the count is 1.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Run `cordova prepare` again. The platforms/ios/ios.json changes, increasing 
> the count to 2.
>   
> {code:java}
> "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Furthermore, if we change the text inside the `` in the `config.xml`:
> {code:java}
> 
> 
> 
> 
> This app uses Camera!
> 
> 
> {code}
> Then after running `cordova prepare`, there is now a second entry in 
> `platforms/ios/ios.json`, rather than replacing the existing entry.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> },
> {
>   "xml": "This app uses Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> This behaviour is the same for Android, and can be reproduced in the same 
> way, by adding something like the below to `config.xml`:
> {code:java}
> 
> 
> 
> 
> 
> 
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-14108) in config.xml increases config_munge count in ios.json and android.json.

2018-05-30 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-14108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16496087#comment-16496087
 ] 

ASF GitHub Bot commented on CB-14108:
-

knight commented on issue #24: CB-14108:
URL: https://github.com/apache/cordova-common/pull/24#issuecomment-393401128
 
 
   Thanks, @dpogue. I try to check the issues CB-13474, CB-13486 and CB-13514.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


>  in config.xml increases config_munge count in ios.json and 
> android.json.
> --
>
> Key: CB-14108
> URL: https://issues.apache.org/jira/browse/CB-14108
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common, cordova-lib
>Affects Versions: 8.0.0
>Reporter: Ken Naito
>Priority: Major
> Fix For: Master
>
>
> On both iOS and Android platforms, using  causes duplication in 
> the `ios.json` and `android.json` files, which could lead to extremely large 
> file sizes (and possibly unexpected behaviour?).
> For a Cordova 7.1/8.0 application, add the following to config.xml:
>  
> {code:java}
>
> 
> 
> 
> Please permit Camera!
> 
> 
> {code}
> Now run `cordova prepare`. The file `platforms/ios/ios.json` now contains the 
> below. Note the count is 1.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Run `cordova prepare` again. The platforms/ios/ios.json changes, increasing 
> the count to 2.
>   
> {code:java}
> "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Furthermore, if we change the text inside the `` in the `config.xml`:
> {code:java}
> 
> 
> 
> 
> This app uses Camera!
> 
> 
> {code}
> Then after running `cordova prepare`, there is now a second entry in 
> `platforms/ios/ios.json`, rather than replacing the existing entry.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> },
> {
>   "xml": "This app uses Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> This behaviour is the same for Android, and can be reproduced in the same 
> way, by adding something like the below to `config.xml`:
> {code:java}
> 
> 
> 
> 
> 
> 
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-14108) in config.xml increases config_munge count in ios.json and android.json.

2018-05-30 Thread Ken Naito (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-14108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16496082#comment-16496082
 ] 

Ken Naito commented on CB-14108:


Thanks Wojciech Trocki.
I have created a pull request to resolve this ticket.
https://github.com/apache/cordova-common/pull/24


>  in config.xml increases config_munge count in ios.json and 
> android.json.
> --
>
> Key: CB-14108
> URL: https://issues.apache.org/jira/browse/CB-14108
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common, cordova-lib
>Affects Versions: 8.0.0
>Reporter: Ken Naito
>Priority: Major
> Fix For: Master
>
>
> On both iOS and Android platforms, using  causes duplication in 
> the `ios.json` and `android.json` files, which could lead to extremely large 
> file sizes (and possibly unexpected behaviour?).
> For a Cordova 7.1/8.0 application, add the following to config.xml:
>  
> {code:java}
>
> 
> 
> 
> Please permit Camera!
> 
> 
> {code}
> Now run `cordova prepare`. The file `platforms/ios/ios.json` now contains the 
> below. Note the count is 1.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Run `cordova prepare` again. The platforms/ios/ios.json changes, increasing 
> the count to 2.
>   
> {code:java}
> "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Furthermore, if we change the text inside the `` in the `config.xml`:
> {code:java}
> 
> 
> 
> 
> This app uses Camera!
> 
> 
> {code}
> Then after running `cordova prepare`, there is now a second entry in 
> `platforms/ios/ios.json`, rather than replacing the existing entry.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> },
> {
>   "xml": "This app uses Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> This behaviour is the same for Android, and can be reproduced in the same 
> way, by adding something like the below to `config.xml`:
> {code:java}
> 
> 
> 
> 
> 
> 
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-14108) in config.xml increases config_munge count in ios.json and android.json.

2018-05-30 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-14108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16494780#comment-16494780
 ] 

ASF GitHub Bot commented on CB-14108:
-

dpogue commented on issue #24: CB-14108:
URL: https://github.com/apache/cordova-common/pull/24#issuecomment-393053654
 
 
   Thanks for the pull request!
   
   I'm not especially familiar with the config munging code, but I know it has 
been a source of edge case bugs and particular around multiple 
plugin.xml/config.xml wanting to make conflicting changes. There are a few open 
issues in JIRA ([CB-13474](https://issues.apache.org/jira/browse/CB-13474), 
[CB-13486](https://issues.apache.org/jira/browse/CB-13486), and 
[CB-13514](https://issues.apache.org/jira/browse/CB-13514) in particular) 
related to those edge cases, and I wanted to check if you thought your changes 
will have any impact (positive or negative) on those. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


>  in config.xml increases config_munge count in ios.json and 
> android.json.
> --
>
> Key: CB-14108
> URL: https://issues.apache.org/jira/browse/CB-14108
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common, cordova-lib
>Affects Versions: 8.0.0
>Reporter: Ken Naito
>Priority: Major
> Fix For: Master
>
>
> On both iOS and Android platforms, using  causes duplication in 
> the `ios.json` and `android.json` files, which could lead to extremely large 
> file sizes (and possibly unexpected behaviour?).
> For a Cordova 7.1/8.0 application, add the following to config.xml:
>  
> {code:java}
>
> 
> 
> 
> Please permit Camera!
> 
> 
> {code}
> Now run `cordova prepare`. The file `platforms/ios/ios.json` now contains the 
> below. Note the count is 1.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Run `cordova prepare` again. The platforms/ios/ios.json changes, increasing 
> the count to 2.
>   
> {code:java}
> "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Furthermore, if we change the text inside the `` in the `config.xml`:
> {code:java}
> 
> 
> 
> 
> This app uses Camera!
> 
> 
> {code}
> Then after running `cordova prepare`, there is now a second entry in 
> `platforms/ios/ios.json`, rather than replacing the existing entry.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> },
> {
>   "xml": "This app uses Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> This behaviour is the same for Android, and can be reproduced in the same 
> way, by adding something like the below to `config.xml`:
> {code:java}
> 
> 
> 
> 
> 
> 
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org



[jira] [Commented] (CB-14108) in config.xml increases config_munge count in ios.json and android.json.

2018-05-29 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-14108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16494724#comment-16494724
 ] 

ASF GitHub Bot commented on CB-14108:
-

codecov-io commented on issue #24: CB-14108:
URL: https://github.com/apache/cordova-common/pull/24#issuecomment-393039909
 
 
   # 
[Codecov](https://codecov.io/gh/apache/cordova-common/pull/24?src=pr&el=h1) 
Report
   > Merging 
[#24](https://codecov.io/gh/apache/cordova-common/pull/24?src=pr&el=desc) into 
[master](https://codecov.io/gh/apache/cordova-common/commit/ff3630f8fc3260bd917d88d130416f386614eecb?src=pr&el=desc)
 will **increase** coverage by `1.58%`.
   > The diff coverage is `94.05%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/cordova-common/pull/24/graphs/tree.svg?token=jsbcYRuqT5&src=pr&width=650&height=150)](https://codecov.io/gh/apache/cordova-common/pull/24?src=pr&el=tree)
   
   ```diff
   @@Coverage Diff@@
   ##   master #24  +/-   ##
   =
   + Coverage   85.51%   87.1%   +1.58% 
   =
 Files  19  19  
 Lines17611830  +69 
 Branches  371 384  +13 
   =
   + Hits 15061594  +88 
   + Misses255 236  -19
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/cordova-common/pull/24?src=pr&el=tree) | 
Coverage Δ | |
   |---|---|---|
   | 
[src/ConfigParser/ConfigParser.js](https://codecov.io/gh/apache/cordova-common/pull/24/diff?src=pr&el=tree#diff-c3JjL0NvbmZpZ1BhcnNlci9Db25maWdQYXJzZXIuanM=)
 | `76.73% <ø> (ø)` | :arrow_up: |
   | 
[src/ConfigChanges/munge-util.js](https://codecov.io/gh/apache/cordova-common/pull/24/diff?src=pr&el=tree#diff-c3JjL0NvbmZpZ0NoYW5nZXMvbXVuZ2UtdXRpbC5qcw==)
 | `95.45% <100%> (+3.56%)` | :arrow_up: |
   | 
[src/ConfigChanges/ConfigFile.js](https://codecov.io/gh/apache/cordova-common/pull/24/diff?src=pr&el=tree#diff-c3JjL0NvbmZpZ0NoYW5nZXMvQ29uZmlnRmlsZS5qcw==)
 | `91.54% <60%> (+1.69%)` | :arrow_up: |
   | 
[src/ConfigChanges/ConfigChanges.js](https://codecov.io/gh/apache/cordova-common/pull/24/diff?src=pr&el=tree#diff-c3JjL0NvbmZpZ0NoYW5nZXMvQ29uZmlnQ2hhbmdlcy5qcw==)
 | `94.18% <95.12%> (-0.5%)` | :arrow_down: |
   | 
[src/util/plist-helpers.js](https://codecov.io/gh/apache/cordova-common/pull/24/diff?src=pr&el=tree#diff-c3JjL3V0aWwvcGxpc3QtaGVscGVycy5qcw==)
 | `95.34% <0%> (+13.95%)` | :arrow_up: |
   | 
[src/CordovaError/CordovaError.js](https://codecov.io/gh/apache/cordova-common/pull/24/diff?src=pr&el=tree#diff-c3JjL0NvcmRvdmFFcnJvci9Db3Jkb3ZhRXJyb3IuanM=)
 | `89.65% <0%> (+44.82%)` | :arrow_up: |
   
   --
   
   [Continue to review full report at 
Codecov](https://codecov.io/gh/apache/cordova-common/pull/24?src=pr&el=continue).
   > **Legend** - [Click here to learn 
more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute  (impact)`, `ø = not affected`, `? = missing data`
   > Powered by 
[Codecov](https://codecov.io/gh/apache/cordova-common/pull/24?src=pr&el=footer).
 Last update 
[ff3630f...fe034d9](https://codecov.io/gh/apache/cordova-common/pull/24?src=pr&el=lastupdated).
 Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


>  in config.xml increases config_munge count in ios.json and 
> android.json.
> --
>
> Key: CB-14108
> URL: https://issues.apache.org/jira/browse/CB-14108
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common, cordova-lib
>Affects Versions: 8.0.0
>Reporter: Ken Naito
>Priority: Major
> Fix For: Master
>
>
> On both iOS and Android platforms, using  causes duplication in 
> the `ios.json` and `android.json` files, which could lead to extremely large 
> file sizes (and possibly unexpected behaviour?).
> For a Cordova 7.1/8.0 application, add the following to config.xml:
>  
> {code:java}
>
> 
> 
> 
> Please permit Camera!
> 
> 
> {code}
> Now run `cordova prepare`. The file `platforms/ios/ios.json` now contains the 
> below. Note the count is 1.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 1

[jira] [Commented] (CB-14108) in config.xml increases config_munge count in ios.json and android.json.

2018-05-29 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/CB-14108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16494722#comment-16494722
 ] 

ASF GitHub Bot commented on CB-14108:
-

knight opened a new pull request #24: CB-14108:
URL: https://github.com/apache/cordova-common/pull/24
 
 
   
   
   ### Platforms affected
   
   All Platforms
   
   ### What does this PR do?
   
   This PR affects the cordova prepare command as follows.
   1. Check the confliction of config-file tag in config.xml.
   2. Prevent unexpected increasing count in config_munge in platformJson 
(ios/ios.json or android/android.json).
   3. Removing unnecessary config_munge directive in platformJson after 
removing config-file tag.
   
   Futrher, adding related test codes. (ConfigError.spec.js, 
ConfigChanges.spec.js)
   
   ### What testing has been done on this change?
   
   Before this PR,  if we use config.file like
   
   ```
  
   
   
   
   Please permit Camera!
   
   
   ```
   , then `cordova prepare` makes platforms/ios/ios.json 
   ```
"config_munge": {
   "files": {
 "*-Info.plist": {
   "parents": {
 "NSCameraUsageDescription": [
   {
 "xml": "Please permit Camera!",
 "count": 1
   }
 ]
   }
 }
   }
 },
   ```
   note that count is 1. Again doing `cordova prepare` makes 
platforms/ios/ios.json
   ```
"config_munge": {
   "files": {
 "*-Info.plist": {
   "parents": {
 "NSCameraUsageDescription": [
   {
 "xml": "Please permit Camera!",
 "count": 2
   }
 ]
   }
 }
   }
 },
   ```
   where the count is 2.
   Further if we remove config-file tag in config.xml, `cordova prepare` does 
not remove anything from  platforms/ios/ios.json.
   
   This unnatural behavior is fixed by this PR.
   
   
   ### Checklist
   - [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) 
in the JIRA database
   - [x] Commit message follows the format: "CB-3232: (android) Fix bug with 
resolving file paths", where CB- is the JIRA ID & "android" is the platform 
affected.
   - [x] Added automated test coverage as appropriate for this change.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


>  in config.xml increases config_munge count in ios.json and 
> android.json.
> --
>
> Key: CB-14108
> URL: https://issues.apache.org/jira/browse/CB-14108
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common, cordova-lib
>Affects Versions: 8.0.0
>Reporter: Ken Naito
>Priority: Major
> Fix For: Master
>
>
> On both iOS and Android platforms, using  causes duplication in 
> the `ios.json` and `android.json` files, which could lead to extremely large 
> file sizes (and possibly unexpected behaviour?).
> For a Cordova 7.1/8.0 application, add the following to config.xml:
>  
> {code:java}
>
> 
> 
> 
> Please permit Camera!
> 
> 
> {code}
> Now run `cordova prepare`. The file `platforms/ios/ios.json` now contains the 
> below. Note the count is 1.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Run `cordova prepare` again. The platforms/ios/ios.json changes, increasing 
> the count to 2.
>   
> {code:java}
> "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Furthermore, if we change the text inside the `` in the `config.xml`:
> {code:java}
> 
> 
> 
> 
> This app uses Camera!
> 
> 
> {code}
> Then after running `cordova prepare`, there is now a second entry in 
> `platforms/ios/ios.json`, rather than replacing the existing entry.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>

[jira] [Commented] (CB-14108) in config.xml increases config_munge count in ios.json and android.json.

2018-05-24 Thread Wojciech Trocki (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-14108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16489647#comment-16489647
 ] 

Wojciech Trocki commented on CB-14108:
--

Issue happening in: 
https://github.com/apache/cordova-lib/blob/d19951b3e37239f699c4f304c0fee8407d89d9c2/src/cordova/prepare.js#L130

Function that is returning no conflicts when '*' is used:
https://github.com/apache/cordova-common/blob/acf133346579a96217d280a8c3186e07d7fc3ef7/src/ConfigChanges/ConfigChanges.js#L330

Issue happening because 

>  in config.xml increases config_munge count in ios.json and 
> android.json.
> --
>
> Key: CB-14108
> URL: https://issues.apache.org/jira/browse/CB-14108
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: cordova-common, cordova-lib
>Affects Versions: 8.0.0
>Reporter: Ken Naito
>Priority: Major
> Fix For: Master
>
>
> On both iOS and Android platforms, using  causes duplication in 
> the `ios.json` and `android.json` files, which could lead to extremely large 
> file sizes (and possibly unexpected behaviour?).
> For a Cordova 7.1/8.0 application, add the following to config.xml:
>  
> {code:java}
>
> 
> 
> 
> Please permit Camera!
> 
> 
> {code}
> Now run `cordova prepare`. The file `platforms/ios/ios.json` now contains the 
> below. Note the count is 1.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Run `cordova prepare` again. The platforms/ios/ios.json changes, increasing 
> the count to 2.
>   
> {code:java}
> "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> }
>   ]
> }
>   }
> }
>   },
> {code}
> Furthermore, if we change the text inside the `` in the `config.xml`:
> {code:java}
> 
> 
> 
> 
> This app uses Camera!
> 
> 
> {code}
> Then after running `cordova prepare`, there is now a second entry in 
> `platforms/ios/ios.json`, rather than replacing the existing entry.
>  
> {code:java}
>  "config_munge": {
> "files": {
>   "*-Info.plist": {
> "parents": {
>   "NSCameraUsageDescription": [
> {
>   "xml": "Please permit Camera!",
>   "count": 2
> },
> {
>   "xml": "This app uses Camera!",
>   "count": 1
> }
>   ]
> }
>   }
> }
>   },
> {code}
> This behaviour is the same for Android, and can be reproduced in the same 
> way, by adding something like the below to `config.xml`:
> {code:java}
> 
> 
> 
> 
> 
> 
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org