unregisterForRemoteNotifications method
void
unregisterForRemoteNotifications()
iOS and macOS only
Temporary disable receiving push notifications until next app restart. You can re-enable immediately with PushHostApi.registerForRemoteNotifications
.
This might be useful if you're logging someone out or you want to completely disable all notifications.
Trying to send an APNs message to the token will fail, until registerForRemoteNotifications
is called.
For iOS details, see https://developer.apple.com/documentation/uikit/uiapplication/1623093-unregisterforremotenotifications
Warning: on IOS simulators, no notifications will be delivered when calling unregisterForRemoteNotifications and then registerForRemoteNotifications
Implementation
void unregisterForRemoteNotifications() {
_pushHostApi.unregisterForRemoteNotifications();
}