incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject ios commit: Updated the "Cordova Plugin Upgrade Guide" regarding the lower-case "c" cordova object change.
Date Mon, 09 Apr 2012 21:31:43 GMT
Updated Branches:
  refs/heads/master b7bc1a980 -> 9d5587e4b


Updated the "Cordova Plugin Upgrade Guide" regarding the lower-case "c" cordova object change.


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

Branch: refs/heads/master
Commit: 9d5587e4b9cecf0b737b22b01d18e67a5a42db57
Parents: b7bc1a9
Author: Shazron Abdullah <shazron@apache.org>
Authored: Mon Apr 9 14:31:35 2012 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Mon Apr 9 14:31:35 2012 -0700

----------------------------------------------------------------------
 guides/Cordova Plugin Upgrade Guide.md |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/9d5587e4/guides/Cordova
Plugin Upgrade Guide.md
----------------------------------------------------------------------
diff --git a/guides/Cordova Plugin Upgrade Guide.md b/guides/Cordova Plugin Upgrade Guide.md
index e0e4b3c..aee45d9 100644
--- a/guides/Cordova Plugin Upgrade Guide.md	
+++ b/guides/Cordova Plugin Upgrade Guide.md	
@@ -8,6 +8,15 @@ This document is for developers who need to upgrade their Cordova  plugins
to a
 1. **Install** Cordova 1.6.0
 2. Follow the **"Upgrading older Cordova plugins to 1.5.0"** section, if necessary
 3. See the **1.6.0 Plugin Notes** section for new functionality available to plugins
+4. The global **"Cordova"** (upper-case C) was renamed to **"cordova"** (lower-case c) to
match the cordova-js Android implementation in 1.5.0 that is now common to Android, Blackberry
and iOS. Please rename your calls to reflect the new lower-case **c**, or you can add a shim
(which will support older versions) like so:
+
+    a. Wrap your plugin JavaScript in a temporary scope (self-executing function) - see ["Temporary
Scope"](http://ejohn.org/apps/learn/#57) or [this](https://github.com/phonegap/phonegap-plugins/wiki/Wrapping-your-Plugin's-JavaScript)
+    b. Inside your temporary scope, set a **local var** to the global PhoneGap/Cordova/cordova
object, for the exec function
+    
+            var cordovaRef = window.PhoneGap || window.Cordova || window.cordova; // old
to new fallbacks
+        
+    c. Replace any **PhoneGap.exec** or **Cordova.exec** or **cordova.exec** in your plugin
JavaScript (within the temporary scope), with **cordovaRef** above
+        
 
 
 ## Upgrading older Cordova plugins to 1.5.0 ##


Mime
View raw message