From bfff56aef43ff36b4551f04d1585b1512c506713 Mon Sep 17 00:00:00 2001 From: Andrew Grieve Date: Wed, 21 Jan 2015 11:46:22 -0500 Subject: [PATCH] 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. --- src/ios/CDVInAppBrowser.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 #import -#import #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];