You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2013/02/22 01:55:47 UTC

[1/3] ios commit: [CB-2516] Additional Plugin Note on Upgrading from 2.3.0 to 2.4.0

[CB-2516] Additional Plugin Note on Upgrading from 2.3.0 to 2.4.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/d7d815df
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/d7d815df
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/d7d815df

Branch: refs/heads/master
Commit: d7d815dfe55415ab687b18c9eadf80174211e5ce
Parents: dfc6a99
Author: Shazron Abdullah <sh...@apache.org>
Authored: Thu Feb 21 16:14:34 2013 -0800
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu Feb 21 16:15:35 2013 -0800

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


http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/d7d815df/guides/Cordova Plugin Upgrade Guide.md
----------------------------------------------------------------------
diff --git a/guides/Cordova Plugin Upgrade Guide.md b/guides/Cordova Plugin Upgrade Guide.md
index bf6191b..5a02fde 100644
--- a/guides/Cordova Plugin Upgrade Guide.md	
+++ b/guides/Cordova Plugin Upgrade Guide.md	
@@ -29,6 +29,19 @@ This document is for developers who need to upgrade their Cordova  plugins to a
 
 JSONKit usage has been removed, and replaced by AppKit's NSJSONSerialization. If you are using CordovaLib's JSONKit, either use your own JSONKit or use NSJSONSerialization instead.
 
+Because of NSJSONSerialization use in Cordova 2.4.0, all the objects in a CDVInvokedUrlCommand.arguments NSArray are immutable. Here is a mutable example: e.g.
+	 
+	 // command is a CDVInvokedUrlCommand object. Here we create a mutable copy of the object
+    NSMutableDictionary* dict = [[command.arguments objectAtIndex:0] mutableCopy];
+    
+    // do things with the dict object, then at the end release it if non-ARC
+    #if __has_feature(objc_arc)
+        // do nothing for ARC
+    #else
+    	 // release it if non-ARC
+    	 [dict release];
+    #endif
+    
 
 ## Upgrading older Cordova plugins to 2.3.0 ##