cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject ios commit: [CB-2510] [1/2] Updated Plugin Upgrade Guide for 2.4.0 -> 2.5.0
Date Fri, 22 Feb 2013 00:17:26 GMT
Updated Branches:
  refs/heads/next d7d815dfe -> 91332c2c0


[CB-2510] [1/2] Updated Plugin Upgrade Guide for 2.4.0 -> 2.5.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/91332c2c
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/91332c2c
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/91332c2c

Branch: refs/heads/next
Commit: 91332c2c0f83e1f7e80d874f6bbae51d89f556e6
Parents: d7d815d
Author: Shazron Abdullah <shazron@apache.org>
Authored: Thu Feb 21 16:17:21 2013 -0800
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Thu Feb 21 16:17:21 2013 -0800

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


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/91332c2c/guides/Cordova Plugin Upgrade
Guide.md
----------------------------------------------------------------------
diff --git a/guides/Cordova Plugin Upgrade Guide.md b/guides/Cordova Plugin Upgrade Guide.md
index 5a02fde..f6b56d4 100644
--- a/guides/Cordova Plugin Upgrade Guide.md	
+++ b/guides/Cordova Plugin Upgrade Guide.md	
@@ -22,6 +22,43 @@
 
 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 2.5.0 ##
+
+1. **Install** Cordova 2.5.0
+2. Follow the **"Upgrading older Cordova plugins to 2.4.0"** section, if necessary
+3. Note the changes in the **CDVPlugin** class in the section below
+
+### Changes in the CDVPlugin class ###
+
+**REMOVED:**
+
+    - (CDVPlugin*)initWithWebView:(UIWebView*)theWebView settings:(NSDictionary*)classSettings;
+
+**ADDED:**
+
+    - (void)pluginInitialize;
+
+Thus, a plugin will be initialized in a two-step process:
+
+    - (CDVPlugin*)initWithWebView:(UIWebView*)theWebView;
+    - (void)pluginInitialize;
+
+**ADDED:** 
+
+A plugin can listen for the **"CDVPageDidLoadNotification"** NSNotification, which is sent
whenever a new web-page has finished loading in the CordovaWebView. The **"CDVPageDidLoadNotification""**
NSNotification is passed the CordovaWebView, which is set as the **object* property of the
NSNotification.
+
+**CHANGED:** 
+
+The **"CDVPluginResetNotification""** NSNotification is now passed the CordovaWebView, which
is set as the **object* property of the NSNotification. A plugin can receive this notification
when it overrides the CDVPlugin **onReset** selector:
+    
+    - (void) onReset:(NSNotification*)notification;
+
+**ADDED:** 
+
+The plugin's **commandDelegate** property has a new **settings** property that represents
the application's settings (preferences from the config.xml file). e.g.
+
+    NSString* mySetting = self.commandDelegate.settings[@"MySetting"];
+
 ## Upgrading older Cordova plugins to 2.4.0 ##
 
 1. **Install** Cordova 2.4.0


Mime
View raw message