cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject cordova-plugin-inappbrowser git commit: CB-8270 Remove usage of `[arr JSONString]`, since it's been renamed to `cdv_JSONString`
Date Wed, 21 Jan 2015 16:48:18 GMT
Repository: cordova-plugin-inappbrowser
Updated Branches:
  refs/heads/master e5d6d6f69 -> bfff56aef


CB-8270 Remove usage of `[arr JSONString]`, since it's been renamed to `cdv_JSONString`

Just updating to the new name would make the plugin incompatible with
previous cordova-ios versions.


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/commit/bfff56ae
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/tree/bfff56ae
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/diff/bfff56ae

Branch: refs/heads/master
Commit: bfff56aef43ff36b4551f04d1585b1512c506713
Parents: e5d6d6f
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Wed Jan 21 11:46:22 2015 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Wed Jan 21 11:48:08 2015 -0500

----------------------------------------------------------------------
 src/ios/CDVInAppBrowser.m | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser/blob/bfff56ae/src/ios/CDVInAppBrowser.m
----------------------------------------------------------------------
diff --git a/src/ios/CDVInAppBrowser.m b/src/ios/CDVInAppBrowser.m
index 4169b6e..71e214e 100644
--- a/src/ios/CDVInAppBrowser.m
+++ b/src/ios/CDVInAppBrowser.m
@@ -20,7 +20,6 @@
 #import "CDVInAppBrowser.h"
 #import <Cordova/CDVPluginResult.h>
 #import <Cordova/CDVUserAgentUtil.h>
-#import <Cordova/CDVJSON.h>
 
 #define    kInAppBrowserTargetSelf @"_self"
 #define    kInAppBrowserTargetSystem @"_system"
@@ -265,7 +264,8 @@
     }
 
     if (jsWrapper != nil) {
-        NSString* sourceArrayString = [@[source] JSONString];
+        NSData* jsonData = [NSJSONSerialization dataWithJSONObject:@[source] options:0 error:nil];
+        NSString* sourceArrayString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
         if (sourceArrayString) {
             NSString* sourceString = [sourceArrayString substringWithRange:NSMakeRange(1,
[sourceArrayString length] - 2)];
             NSString* jsToInject = [NSString stringWithFormat:jsWrapper, sourceString];


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message