Skip to content
This repository was archived by the owner on Sep 4, 2020. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/ios/PushPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ - (void)unregister:(CDVInvokedUrlCommand*)command;
[pubSub unsubscribeFromTopic:topic];
}
} else {
[[UIApplication sharedApplication] unregisterForRemoteNotifications];
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ccorcos you can't delete this section as it is required for users who are using APNS to send messages. You have found an issue though and the code should check to see if usesFCM is true. If it is then you should call the deleteIDWithHandler method.

[self successWithMessage:command.callbackId withMsg:@"unregistered"];
[[FIRInstanceID instanceID] deleteIDWithHandler:^void(NSError *_Nullable error){
[self successWithMessage:command.callbackId withMsg:@"unregistered"];
}];
}
}

Expand Down