cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject [2/2] git commit: Fixes CB-2237: Support for <preference> elements in Android + iOS. Bump to 2.3.5.
Date Fri, 18 Jan 2013 00:03:53 GMT
Updated Branches:
  refs/heads/master 161446a61 -> 92ff11f50


Fixes CB-2237: Support for <preference> elements in Android + iOS. Bump to 2.3.5.


Project: http://git-wip-us.apache.org/repos/asf/cordova-cli/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-cli/commit/92ff11f5
Tree: http://git-wip-us.apache.org/repos/asf/cordova-cli/tree/92ff11f5
Diff: http://git-wip-us.apache.org/repos/asf/cordova-cli/diff/92ff11f5

Branch: refs/heads/master
Commit: 92ff11f50513a47d61bf7c59892f8bdc6f68d666
Parents: af5d44f
Author: Fil Maj <maj.fil@gmail.com>
Authored: Thu Jan 17 16:06:36 2013 -0800
Committer: Fil Maj <maj.fil@gmail.com>
Committed: Thu Jan 17 16:06:36 2013 -0800

----------------------------------------------------------------------
 package.json                   |    2 +-
 src/metadata/android_parser.js |    9 +++++++++
 src/metadata/ios_parser.js     |    9 ++++++++-
 3 files changed, 18 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/92ff11f5/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index 9e5c25b..7ff636b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "cordova",
-  "version": "2.3.4",
+  "version": "2.3.5",
   "preferGlobal": "true",
   "description": "Cordova command line interface tool",
   "main": "cordova",

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/92ff11f5/src/metadata/android_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/android_parser.js b/src/metadata/android_parser.js
index 6723ff1..333fc1b 100644
--- a/src/metadata/android_parser.js
+++ b/src/metadata/android_parser.js
@@ -50,6 +50,15 @@ module.exports.prototype = {
         config.access.get().forEach(function(uri) {
             android_cfg_xml.access.add(uri);
         });
+        
+        // update any preferences
+        android_cfg_xml.preference.remove();
+        config.preference.get().forEach(function(pref) {
+            android_cfg_xml.preference.add({
+                name:pref.name,
+                value:pref.value
+            });
+        });
     },
 
     // Returns the platform-specific www directory.

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/92ff11f5/src/metadata/ios_parser.js
----------------------------------------------------------------------
diff --git a/src/metadata/ios_parser.js b/src/metadata/ios_parser.js
index 422690d..cdfeb3f 100644
--- a/src/metadata/ios_parser.js
+++ b/src/metadata/ios_parser.js
@@ -38,11 +38,18 @@ module.exports.prototype = {
 
         // Update whitelist
         var self = this;
-        // Remove old access elements
         this.config.access.remove();
         config.access.get().forEach(function(uri) {
             self.config.access.add(uri);
         });
+        // Update preferences
+        this.config.preference.remove();
+        config.preference.get().forEach(function(pref) {
+            self.config.preference.add({
+                name:pref.name,
+                value:pref.value
+            });
+        });
         
         // Update product name
         var proj = new xcode.project(this.pbxproj);


Mime
View raw message