Updated Branches: refs/heads/master 766ac9512 -> 861dd7015
[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/861dd701 Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/861dd701 Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/861dd701 Branch: refs/heads/master Commit: 861dd701532417ffb230688a4743586c8b633f91 Parents: 766ac95 Author: Shazron Abdullah <[email protected]> Authored: Mon Apr 22 17:26:09 2013 -0700 Committer: Shazron Abdullah <[email protected]> Committed: Mon Apr 22 17:26:09 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/861dd701/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
