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 2013/04/30 01:31:25 UTC
[4/4] ios commit: Updated cordova-js for 2.7.0
Updated cordova-js for 2.7.0
Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/c164681a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/c164681a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/c164681a
Branch: refs/heads/2.7.x
Commit: c164681a1f757f76900df738d4fa970e0e03a312
Parents: 3a5d577
Author: Shazron Abdullah <sh...@apache.org>
Authored: Mon Apr 29 16:16:32 2013 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Mon Apr 29 16:31:01 2013 -0700
----------------------------------------------------------------------
CordovaLib/cordova.ios.js | 24 ++++++++++++++++--------
1 files changed, 16 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/c164681a/CordovaLib/cordova.ios.js
----------------------------------------------------------------------
diff --git a/CordovaLib/cordova.ios.js b/CordovaLib/cordova.ios.js
index 844816f..b716939 100644
--- a/CordovaLib/cordova.ios.js
+++ b/CordovaLib/cordova.ios.js
@@ -1,8 +1,8 @@
// Platform: ios
-// commit 360bd3e65c33ce4f01e2efb82d641a565ef3c333
+// commit cd29cf0f224ccf25e9d422a33fd02ef67d3a78f4
-// File generated at :: Fri Apr 19 2013 18:36:09 GMT-0700 (PDT)
+// File generated at :: Mon Apr 29 2013 16:14:47 GMT-0700 (PDT)
/*
Licensed to the Apache Software Foundation (ASF) under one
@@ -909,11 +909,19 @@ function iOSExec() {
// an invalid callbackId and passes it even if no callbacks were given.
callbackId = 'INVALID';
} else {
- // FORMAT TWO
- splitCommand = arguments[0].split(".");
- action = splitCommand.pop();
- service = splitCommand.join(".");
- actionArgs = Array.prototype.splice.call(arguments, 1);
+ // FORMAT TWO, REMOVED
+ try {
+ splitCommand = arguments[0].split(".");
+ action = splitCommand.pop();
+ service = splitCommand.join(".");
+ actionArgs = Array.prototype.splice.call(arguments, 1);
+
+ console.log('The old format of this exec call has been removed (deprecated since 2.1). Change to: ' +
+ "cordova.exec(null, null, \"" + service + "\", " + action + "\"," + JSON.stringify(actionArgs) + ");"
+ );
+ return;
+ } catch (e) {
+ }
}
// Register the callbacks and add the callbackId to the positional
@@ -6388,7 +6396,7 @@ require('cordova/channel').onNativeReady.fire();
xhr.onload = function() {
// If the response is a JSON string which composes an array, call handlePluginsObject.
// If the request fails, or the response is not a JSON array, just call finishPluginLoading.
- var obj = JSON.parse(this.responseText);
+ var obj = this.responseText && JSON.parse(this.responseText);
if (obj && obj instanceof Array && obj.length > 0) {
handlePluginsObject(obj);
} else {