From 124b2bf07fb21022ae4dce05369289b65e350cdf Mon Sep 17 00:00:00 2001 From: Mahmoud Abdurrahman Date: Wed, 23 Dec 2020 19:03:32 +0200 Subject: [PATCH 1/3] Fix invalid token decoding --- ios/Classes/IntercomFlutterPlugin.m | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ios/Classes/IntercomFlutterPlugin.m b/ios/Classes/IntercomFlutterPlugin.m index ac2b4bec..22b5a3db 100644 --- a/ios/Classes/IntercomFlutterPlugin.m +++ b/ios/Classes/IntercomFlutterPlugin.m @@ -153,11 +153,6 @@ - (void) handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)result else if([@"displayMessageComposer" isEqualToString:call.method]) { NSString *message = call.arguments[@"message"]; [Intercom presentMessageComposer:message]; - } else if([@"sendTokenToIntercom" isEqualToString:call.method]){ - NSString *token = call.arguments[@"token"]; - NSData* encodedToken=[token dataUsingEncoding:NSUTF8StringEncoding]; - [Intercom setDeviceToken:encodedToken]; - result(@"Token set"); } else if([@"sendTokenToIntercom" isEqualToString:call.method]) { NSString *token = call.arguments[@"token"]; From f83f26e7317980e36df672f9f627818974bb875f Mon Sep 17 00:00:00 2001 From: Mahmoud Abdurrahman Date: Wed, 23 Dec 2020 19:07:29 +0200 Subject: [PATCH 2/3] Fix old Intercom sdk dependency --- ios/intercom_flutter.podspec | 1 - 1 file changed, 1 deletion(-) diff --git a/ios/intercom_flutter.podspec b/ios/intercom_flutter.podspec index da675095..a97d1576 100644 --- a/ios/intercom_flutter.podspec +++ b/ios/intercom_flutter.podspec @@ -17,7 +17,6 @@ A new flutter plugin project. s.dependency 'Flutter' s.dependency 'Intercom' s.static_framework = true - s.dependency 'Intercom', '~> 7.1.0' s.ios.deployment_target = '10.0' end From 6e8c7aa1a4c776dbae5568a787835714c5021cb6 Mon Sep 17 00:00:00 2001 From: Mahmoud Abdurrahman Date: Wed, 23 Dec 2020 19:04:01 +0200 Subject: [PATCH 3/3] Enable Intercom debugging in debug builds --- ios/Classes/IntercomFlutterPlugin.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ios/Classes/IntercomFlutterPlugin.m b/ios/Classes/IntercomFlutterPlugin.m index 22b5a3db..527ee3d2 100644 --- a/ios/Classes/IntercomFlutterPlugin.m +++ b/ios/Classes/IntercomFlutterPlugin.m @@ -34,7 +34,9 @@ + (void)registerWithRegistrar:(NSObject*)registrar { UnreadStreamHandler* unreadStreamHandler = [[UnreadStreamHandler alloc] init]; [unreadChannel setStreamHandler:unreadStreamHandler]; - + #if DEBUG + [Intercom enableLogging]; + #endif } - (instancetype)initWithChannel:(FlutterMethodChannel *)channel {