Unregistering From Push Notifications

suggest change

To unregister from remote notifications programmatically you can use the following. This is Swift 2. It unregisters the app with APNs. It is not the same as the user turning Notifications off in Settings, and the system may register the app again later.

Objective-C

[[UIApplication sharedApplication] unregisterForRemoteNotifications];

Swift

UIApplication.sharedApplication().unregisterForRemoteNotifications()

NOTE: There may be rare cases where you would need this (for example, when your app no longer supports push notifications).

If you just want to allow the user to temporarily disable notifications, remove the device token from the database on your server. If you only disable notifications locally, your server will still send messages.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents