cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject js commit: [CB-3210] Remove old exec signature from iOSExec
Date Tue, 23 Apr 2013 00:27:57 GMT
Updated Branches:
  refs/heads/2.7.x 6d7a99bf1 -> 0b9457964


[CB-3210] Remove old exec signature from iOSExec


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/0b945796
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/0b945796
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/0b945796

Branch: refs/heads/2.7.x
Commit: 0b9457964b3e531c8466b16fc940609a3ce7959e
Parents: 6d7a99b
Author: Shazron Abdullah <shazron@apache.org>
Authored: Mon Apr 22 17:26:09 2013 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Mon Apr 22 17:27:20 2013 -0700

----------------------------------------------------------------------
 lib/ios/exec.js |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/0b945796/lib/ios/exec.js
----------------------------------------------------------------------
diff --git a/lib/ios/exec.js b/lib/ios/exec.js
index 5e237d9..7023c06 100644
--- a/lib/ios/exec.js
+++ b/lib/ios/exec.js
@@ -143,11 +143,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


Mime
View raw message