aaronk Well-Known Member Licensed User Longtime User Nov 25, 2019 #1 Hi, I am using firebase push notifications and just wondering if there is a way in resetting the token ? In B4A you can do it with this code but just wondering if there is something like this for B4i ?
Hi, I am using firebase push notifications and just wondering if there is a way in resetting the token ? In B4A you can do it with this code but just wondering if there is something like this for B4i ?
Erel B4X founder Staff member Licensed User Longtime User Nov 25, 2019 #2 Which problem are you trying to solve? Upvote 0
aaronk Well-Known Member Licensed User Longtime User Nov 25, 2019 #3 I was hoping to clear all notifications that the user is subscribed to without knowing which topics they are already subscribed to. Upvote 0
I was hoping to clear all notifications that the user is subscribed to without knowing which topics they are already subscribed to.
Erel B4X founder Staff member Licensed User Longtime User Nov 25, 2019 #4 1. Add this code: B4X: #if OBJC #import <FirebaseInstanceId/FirebaseInstanceId.h> - (void)DeleteInstanceId { [[FIRInstanceID instanceID] deleteIDWithHandler:^void(NSError *_Nullable error){ if (error) { NSLog(@"Error: %@", error); } else { NSLog(@"Deleted"); } }]; } #End If 2. B4X: #AdditionalLib: FirebaseInstanceId.framework.3 3. B4X: Dim no As NativeObject = Me no.RunMethod("DeleteInstanceId", Null) Upvote 0
1. Add this code: B4X: #if OBJC #import <FirebaseInstanceId/FirebaseInstanceId.h> - (void)DeleteInstanceId { [[FIRInstanceID instanceID] deleteIDWithHandler:^void(NSError *_Nullable error){ if (error) { NSLog(@"Error: %@", error); } else { NSLog(@"Deleted"); } }]; } #End If 2. B4X: #AdditionalLib: FirebaseInstanceId.framework.3 3. B4X: Dim no As NativeObject = Me no.RunMethod("DeleteInstanceId", Null)