From 5ec01d5570ccae3d11d923b6b3042227aedfadb1 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 28 Nov 2018 00:41:51 -0500 Subject: [PATCH] Switch away from deprecated base64 methods. --- Source/DebuggerBackEnd.m | 3 ++- Source/NSXMLElementAdditions.m | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/DebuggerBackEnd.m b/Source/DebuggerBackEnd.m index 80a8e10..f69d5b6 100644 --- a/Source/DebuggerBackEnd.m +++ b/Source/DebuggerBackEnd.m @@ -235,7 +235,8 @@ NSString* value = [parent base64DecodedValue]; callback(value); }; - [_client sendCustomCommandWithFormat:@"eval -i {txn} -- %@" handler:handler, [stringData base64Encoding]]; + [_client sendCustomCommandWithFormat:@"eval -i {txn} -- %@" + handler:handler, [stringData base64EncodedStringWithOptions:0]]; } // Protocol Client Delegate //////////////////////////////////////////////////// diff --git a/Source/NSXMLElementAdditions.m b/Source/NSXMLElementAdditions.m index c3fb54e..4319a44 100644 --- a/Source/NSXMLElementAdditions.m +++ b/Source/NSXMLElementAdditions.m @@ -50,7 +50,8 @@ { // The value of the node is base64 encoded. if ([[[self attributeForName:@"encoding"] stringValue] isEqualToString:@"base64"]) { - NSData* base64Data = [[[NSData alloc] initWithBase64Encoding:[self stringValue]] autorelease]; + NSData* data = [[self stringValue] dataUsingEncoding:NSASCIIStringEncoding]; + NSData* base64Data = [[[NSData alloc] initWithBase64EncodedData:data options:0] autorelease]; if (base64Data) { return [[[NSString alloc] initWithData:base64Data encoding:NSUTF8StringEncoding] autorelease]; } else { -- 2.43.5