From 6fb22cdf47f289eec79027ad0d00ab90421b2527 Mon Sep 17 00:00:00 2001 From: Chet Corcos Date: Thu, 4 Jan 2018 14:28:43 -0800 Subject: [PATCH] Unregister token with firebase --- src/ios/PushPlugin.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ios/PushPlugin.m b/src/ios/PushPlugin.m index eb7b69ef0..b5ecc53eb 100644 --- a/src/ios/PushPlugin.m +++ b/src/ios/PushPlugin.m @@ -119,8 +119,9 @@ - (void)unregister:(CDVInvokedUrlCommand*)command; [pubSub unsubscribeFromTopic:topic]; } } else { - [[UIApplication sharedApplication] unregisterForRemoteNotifications]; - [self successWithMessage:command.callbackId withMsg:@"unregistered"]; + [[FIRInstanceID instanceID] deleteIDWithHandler:^void(NSError *_Nullable error){ + [self successWithMessage:command.callbackId withMsg:@"unregistered"]; + }]; } }