You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2014/08/29 22:27:03 UTC

[1/2] ios commit: Set VERSION to 3.7.0-dev (via coho)

Repository: cordova-ios
Updated Branches:
  refs/heads/master 14e2ddeec -> 62f924e6c


Set VERSION to 3.7.0-dev (via coho)


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/2db4c08b
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/2db4c08b
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/2db4c08b

Branch: refs/heads/master
Commit: 2db4c08b4b2803c0b2c1706bfbe82fde2a223716
Parents: 14e2dde
Author: Shazron Abdullah <sh...@apache.org>
Authored: Fri Aug 29 13:24:58 2014 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Fri Aug 29 13:24:58 2014 -0700

----------------------------------------------------------------------
 CordovaLib/VERSION                    |  2 +-
 bin/templates/scripts/cordova/version |  2 +-
 package.json                          | 42 +++++++++++++++---------------
 3 files changed, 23 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/2db4c08b/CordovaLib/VERSION
----------------------------------------------------------------------
diff --git a/CordovaLib/VERSION b/CordovaLib/VERSION
index 86bab9c..a4ce38e 100644
--- a/CordovaLib/VERSION
+++ b/CordovaLib/VERSION
@@ -1 +1 @@
-3.6.0-dev
+3.7.0-dev

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/2db4c08b/bin/templates/scripts/cordova/version
----------------------------------------------------------------------
diff --git a/bin/templates/scripts/cordova/version b/bin/templates/scripts/cordova/version
index 0b576d8..1f5d364 100755
--- a/bin/templates/scripts/cordova/version
+++ b/bin/templates/scripts/cordova/version
@@ -24,6 +24,6 @@
 # Note: it does not work if the --shared option was used to create the project.
 #
 
-VERSION="3.5.0"
+VERSION="3.7.0-dev"
 
 echo $VERSION 

http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/2db4c08b/package.json
----------------------------------------------------------------------
diff --git a/package.json b/package.json
index b919e7b..f11f29f 100644
--- a/package.json
+++ b/package.json
@@ -1,22 +1,22 @@
 {
-  "name": "cordova-ios",
-  "version": "3.5.0",
-  "description": "cordova-ios release",
-  "main": "bin/create",
-  "repository": {
-    "type": "git",
-    "url": "https://git-wip-us.apache.org/repos/asf/cordova-ios.git"
-  },
-  "keywords": [
-    "ios",
-    "cordova",
-    "apache"
-  ],
-  "author": "Apache Software Foundation",
-  "license": "Apache Version 2.0",
-  "dependencies": {
-    "shelljs": "^0.2.6",
-    "coffee-script": "^1.7.1",
-    "nodeunit": "^0.8.7"
-  }
-}
+    "name": "cordova-ios",
+    "version": "3.7.0-dev",
+    "description": "cordova-ios release",
+    "main": "bin/create",
+    "repository": {
+        "type": "git",
+        "url": "https://git-wip-us.apache.org/repos/asf/cordova-ios.git"
+    },
+    "keywords": [
+        "ios",
+        "cordova",
+        "apache"
+    ],
+    "author": "Apache Software Foundation",
+    "license": "Apache Version 2.0",
+    "dependencies": {
+        "shelljs": "^0.2.6",
+        "coffee-script": "^1.7.1",
+        "nodeunit": "^0.8.7"
+    }
+}
\ No newline at end of file


[2/2] ios commit: Update JS snapshot to version 3.7.0-dev (via coho)

Posted by sh...@apache.org.
Update JS snapshot to version 3.7.0-dev (via coho)


Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/62f924e6
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/62f924e6
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/62f924e6

Branch: refs/heads/master
Commit: 62f924e6c7cff7be4c4a609aeb6674d0a170a8a0
Parents: 2db4c08
Author: Shazron Abdullah <sh...@apache.org>
Authored: Fri Aug 29 13:25:01 2014 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Fri Aug 29 13:25:01 2014 -0700

----------------------------------------------------------------------
 CordovaLib/cordova.js | 55 ++++++++++++++++++++++++++++------------------
 1 file changed, 34 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/62f924e6/CordovaLib/cordova.js
----------------------------------------------------------------------
diff --git a/CordovaLib/cordova.js b/CordovaLib/cordova.js
index 4f64444..d7a962a 100644
--- a/CordovaLib/cordova.js
+++ b/CordovaLib/cordova.js
@@ -1,5 +1,5 @@
 // Platform: ios
-// 3.6.0-dev-7e845f3
+// 3.7.0-dev-8f41e8d
 /*
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
@@ -19,7 +19,7 @@
  under the License.
 */
 ;(function() {
-var CORDOVA_JS_BUILD_LABEL = '3.6.0-dev-7e845f3';
+var CORDOVA_JS_BUILD_LABEL = '3.7.0-dev-8f41e8d';
 // file: src/scripts/require.js
 
 /*jshint -W079 */
@@ -265,7 +265,7 @@ var cordova = {
         try {
             cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback);
         } catch (e) {
-            console.log("Error in error callback: " + callbackId + " = "+e);
+            console.log("Error in success callback: " + callbackId + " = "+e);
         }
     },
 
@@ -826,7 +826,8 @@ var cordova = require('cordova'),
         XHR_OPTIONAL_PAYLOAD: 3,
         IFRAME_HASH_NO_PAYLOAD: 4,
         // Bundling the payload turns out to be slower. Probably since it has to be URI encoded / decoded.
-        IFRAME_HASH_WITH_PAYLOAD: 5
+        IFRAME_HASH_WITH_PAYLOAD: 5,
+        WK_WEBVIEW_BINDING: 6
     },
     bridgeMode,
     execIframe,
@@ -921,7 +922,15 @@ function iOSExec() {
     // Use IFRAME_NAV elsewhere since it's faster and XHR bridge
     // seems to have bugs in newer OS's (CB-3900, CB-3359, CB-5457, CB-4970, CB-4998, CB-5134)
     if (bridgeMode === undefined) {
-        bridgeMode = navigator.userAgent.indexOf(' 5_') == -1 ? jsToNativeModes.IFRAME_NAV: jsToNativeModes.XHR_NO_PAYLOAD;
+        if (navigator.userAgent) {
+            bridgeMode = navigator.userAgent.indexOf(' 5_') == -1 ? jsToNativeModes.IFRAME_NAV: jsToNativeModes.XHR_NO_PAYLOAD;
+        } else {
+            bridgeMode = jsToNativeModes.IFRAME_NAV;
+        }
+    }
+
+    if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.cordova && window.webkit.messageHandlers.cordova.postMessage) {
+        bridgeMode = jsToNativeModes.WK_WEBVIEW_BINDING;
     }
 
     var successCallback, failCallback, service, action, actionArgs, splitCommand;
@@ -973,20 +982,24 @@ function iOSExec() {
     // effectively clone the command arguments in case they are mutated before
     // the command is executed.
     commandQueue.push(JSON.stringify(command));
-
-    // If we're in the context of a stringByEvaluatingJavaScriptFromString call,
-    // then the queue will be flushed when it returns; no need for a poke.
-    // Also, if there is already a command in the queue, then we've already
-    // poked the native side, so there is no reason to do so again.
-    if (!isInContextOfEvalJs && commandQueue.length == 1) {
-        switch (bridgeMode) {
-        case jsToNativeModes.XHR_NO_PAYLOAD:
-        case jsToNativeModes.XHR_WITH_PAYLOAD:
-        case jsToNativeModes.XHR_OPTIONAL_PAYLOAD:
-            pokeNativeViaXhr();
-            break;
-        default: // iframe-based.
-            pokeNativeViaIframe();
+    
+    if (bridgeMode === jsToNativeModes.WK_WEBVIEW_BINDING) {
+        window.webkit.messageHandlers.cordova.postMessage(command);
+    } else {
+        // If we're in the context of a stringByEvaluatingJavaScriptFromString call,
+        // then the queue will be flushed when it returns; no need for a poke.
+        // Also, if there is already a command in the queue, then we've already
+        // poked the native side, so there is no reason to do so again.
+        if (!isInContextOfEvalJs && commandQueue.length == 1) {
+            switch (bridgeMode) {
+            case jsToNativeModes.XHR_NO_PAYLOAD:
+            case jsToNativeModes.XHR_WITH_PAYLOAD:
+            case jsToNativeModes.XHR_OPTIONAL_PAYLOAD:
+                pokeNativeViaXhr();
+                break;
+            default: // iframe-based.
+                pokeNativeViaIframe();
+            }
         }
     }
 }
@@ -1539,11 +1552,11 @@ function handlePluginsObject(path, moduleList, finishPluginLoading) {
 function findCordovaPath() {
     var path = null;
     var scripts = document.getElementsByTagName('script');
-    var term = 'cordova.js';
+    var term = '/cordova.js';
     for (var n = scripts.length-1; n>-1; n--) {
         var src = scripts[n].src.replace(/\?.*$/, ''); // Strip any query param (CB-6007).
         if (src.indexOf(term) == (src.length - term.length)) {
-            path = src.substring(0, src.length - term.length);
+            path = src.substring(0, src.length - term.length) + '/';
             break;
         }
     }