Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 79E7717DA1 for ; Tue, 27 Jan 2015 16:35:25 +0000 (UTC) Received: (qmail 37463 invoked by uid 500); 27 Jan 2015 16:35:25 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 37432 invoked by uid 500); 27 Jan 2015 16:35:25 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 37417 invoked by uid 99); 27 Jan 2015 16:35:25 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jan 2015 16:35:25 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B95C8E03F8; Tue, 27 Jan 2015 16:35:25 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: agrieve@apache.org To: commits@cordova.apache.org Date: Tue, 27 Jan 2015 16:35:25 -0000 Message-Id: <71a923d8517e43a3bb673ba6c21892da@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/2] cordova-plugin-media-capture git commit: CB-8351 ios: Stop using (newly) deprecated CDVJSON.h Repository: cordova-plugin-media-capture Updated Branches: refs/heads/master 734e59852 -> 3374bf41d CB-8351 ios: Stop using (newly) deprecated CDVJSON.h Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/commit/0f187eb4 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/tree/0f187eb4 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/diff/0f187eb4 Branch: refs/heads/master Commit: 0f187eb4335de45004a9036fe2650152d1e376d4 Parents: 734e598 Author: Andrew Grieve Authored: Tue Jan 27 11:34:54 2015 -0500 Committer: Andrew Grieve Committed: Tue Jan 27 11:34:54 2015 -0500 ---------------------------------------------------------------------- src/ios/CDVCapture.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-media-capture/blob/0f187eb4/src/ios/CDVCapture.m ---------------------------------------------------------------------- diff --git a/src/ios/CDVCapture.m b/src/ios/CDVCapture.m index c3980d3..48dd65f 100644 --- a/src/ios/CDVCapture.m +++ b/src/ios/CDVCapture.m @@ -19,7 +19,6 @@ #import "CDVCapture.h" #import "CDVFile.h" -#import #import #define kW3CMediaFormatHeight @"height" @@ -342,7 +341,11 @@ movieArray ? (NSObject*) movieArray:[NSNull null], @"video", audioArray ? (NSObject*) audioArray:[NSNull null], @"audio", nil]; - NSString* jsString = [NSString stringWithFormat:@"navigator.device.capture.setSupportedModes(%@);", [modes JSONString]]; + + NSData* jsonData = [NSJSONSerialization dataWithJSONObject:modes options:0 error:nil]; + NSString* jsonStr = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; + + NSString* jsString = [NSString stringWithFormat:@"navigator.device.capture.setSupportedModes(%@);", jsonStr]; [self.commandDelegate evalJs:jsString]; } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org For additional commands, e-mail: commits-help@cordova.apache.org