incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject ios commit: Fixed CB-381 - Update Cordova Plugin Upgrade Guide for 1.6.0
Date Thu, 05 Apr 2012 19:42:57 GMT
Updated Branches:
  refs/heads/master 0089d98c6 -> f451a6b07


Fixed CB-381 - Update Cordova Plugin Upgrade Guide for 1.6.0


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/f451a6b0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/f451a6b0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/f451a6b0

Branch: refs/heads/master
Commit: f451a6b076191185d43a17cd05d499b7659570c8
Parents: 0089d98
Author: Shazron Abdullah <shazron@apache.org>
Authored: Thu Apr 5 12:42:32 2012 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Thu Apr 5 12:42:32 2012 -0700

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


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/f451a6b0/guides/Cordova
Plugin Upgrade Guide.md
----------------------------------------------------------------------
diff --git a/guides/Cordova Plugin Upgrade Guide.md b/guides/Cordova Plugin Upgrade Guide.md
index d979dc2..e0e4b3c 100644
--- a/guides/Cordova Plugin Upgrade Guide.md	
+++ b/guides/Cordova Plugin Upgrade Guide.md	
@@ -2,6 +2,14 @@
 
 This document is for developers who need to upgrade their Cordova  plugins to a newer Cordova
version. Starting with Cordova 1.5.0, some classes have been renamed, which will require the
plugin to be upgraded. Make sure your project itself has been upgraded using the "Cordova
Upgrade Guide" document.
 
+
+## Upgrading older Cordova plugins to 1.6.0 ##
+
+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
+
+
 ## Upgrading older Cordova plugins to 1.5.0 ##
 
 1. **Install** Cordova 1.5.0
@@ -9,6 +17,27 @@ This document is for developers who need to upgrade their Cordova  plugins
to a
 3. Replace import occurrences of **"&lt;PhoneGap/"** with **"&lt;Cordova/"**
 4. Replace class prefixes of **PG** with **CDV** (for example **PG**Plugin becomes **CDV**Plugin)
 5. Replace occurrences of **[self appViewController]** with **self.viewController**. 
+6. See the **1.5.0 Plugin Notes** section for new functionality available to plugins
+
+## 1.6.0 Plugin Notes ##
+
+1. There is a new CDVCommandDelegate protocol method available:
+
+        - (void) registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className;
+    
+    You use this in your plugin to initialize another plugin that your plugin needs to be
available and running (dependency), and all plugins can access the registered plugin from
the **getCommandInstance** method of the CDVCommandDelegate. This is a substitute for listing
a plugin your plugin depends on, in **Cordova.plist/Plugins**.
+2. There is a new **IsAtLeastiOSVersion** macro available in **CDVAvailability.h**:
+
+        // Returns YES if it is at least version specified as NSString(X)
+        if (IsAtLeastiOSVersion(@"5.1")) {
+            // do something for iOS 5.1 or greater
+        }
+3. There are **Compatibility headers** available for versions 0.9.6 and 1.5.0, in **~/Documents/CordovaLib/Classes/compatibility**
(where ~ signifies your Home folder). See the **"README.txt"** in that folder for instructions.

+    
+    Note that including these headers are all or nothing - you can't have a mix and match
of plugin versions, if you include the 0.9.6 compatibility header - all your plugins must
be of the same "version". It is highly recommended that you upgrade your plugins to the current
version instead of using these stop-gap headers. 
+    
+    The 1.5.0 header shouldn't be used - this is included for the [LocalStorage patch](https://issues.apache.org/jira/browse/CB-330)
and is for using core plugins as general plugins that easily support multiple versions, and
may be removed in the future.
+
 
 ## 1.5.0 Plugin Notes ##
 


Mime
View raw message