From ee931ced52b5e69fdb0643bc24714ca7d76ae597 Mon Sep 17 00:00:00 2001 From: Vishal Isharani Date: Tue, 20 Feb 2024 16:46:54 +0530 Subject: [PATCH 1/2] fix: Add refreshToken method to Plugin.m --- ios/Plugin/Plugin/Plugin.m | 1 + 1 file changed, 1 insertion(+) diff --git a/ios/Plugin/Plugin/Plugin.m b/ios/Plugin/Plugin/Plugin.m index f8db5ef..b06492e 100644 --- a/ios/Plugin/Plugin/Plugin.m +++ b/ios/Plugin/Plugin/Plugin.m @@ -10,4 +10,5 @@ CAP_PLUGIN_METHOD(deleteInstance, CAPPluginReturnPromise); CAP_PLUGIN_METHOD(setAutoInit, CAPPluginReturnPromise); CAP_PLUGIN_METHOD(isAutoInitEnabled, CAPPluginReturnPromise); + CAP_PLUGIN_METHOD(refreshToken, CAPPluginReturnPromise); ) From 776db6fb5319d577dbd12e7c59a39c44843f144b Mon Sep 17 00:00:00 2001 From: Vishal Isharani Date: Fri, 11 Oct 2024 10:14:41 +0530 Subject: [PATCH 2/2] fix: reset fcmToken when deleteInstance is called --- ios/Plugin/Plugin/Plugin.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ios/Plugin/Plugin/Plugin.swift b/ios/Plugin/Plugin/Plugin.swift index 1f47678..c0e0dd6 100644 --- a/ios/Plugin/Plugin/Plugin.swift +++ b/ios/Plugin/Plugin/Plugin.swift @@ -112,6 +112,8 @@ public class FCMPlugin: CAPPlugin, MessagingDelegate { print("Error deleting installation: \(error)") call.reject("Cant delete Firebase Instance ID", error.localizedDescription) } + // reset fcmToken + self.fcmToken = ""; call.resolve(); } }