[FYI – Few users have reported that it stopped working on iOS 10]
You can easily enable and disable push notifications in your application by calling
unregisterForRemoteNotificationTypes respectively again. I have tried this and it works.
More Related Contents:
- UIApplication.registerForRemoteNotifications() must be called from main thread only
- Registering for Push Notifications in Xcode 8/Swift 3.0?
- Getting local notifications to show while app is in foreground Swift 3
- How to send a silent Push Notification payload
- iOS push notification: how to detect if the user tapped on notification when the app is in background?
- Swift ios check if remote push notifications are enabled in ios9 and ios10
- It’s possible to change push notification message before display on device from iOS side?
- Alternative to UserNotificationCenterDelegate’s willPresent when app is in background
- Xcode 8.1 Push Notifications in swift 2.3 with firebase integration not getting?
- How to display and hide table view cells in swift
- By fetching Date using this struct getting nil value even i have manually set date on having nil in swift 3 [duplicate]
- Swift PNG Image being saved with incorrect orientation
- Does Swift support reflection?
- how to display image in ios push notification?
- LLDB (Swift): Casting Raw Address into Usable Type
- How do I use subscript and superscript in Swift?
- Get image from documents directory swift
- Access Container View Controller from Parent iOS
- Swift3 iOS – How to make UITapGestureRecognizer trigger function
- Audio files won’t play with AirPods Pro on iOS 15
- ARKit – Apply CIFilter to a specific vertices of ARFaceAnchor
- Resize textField Based On Content
- Maximum number of threads with async-await task groups
- Querying iOS Keychain using Swift
- Firebase chat Push Notifications
- How to create a String with format?
- Swift compatibility between versions for a library
- Swift JSON error : Could not cast value of type ‘__NSDictionaryM’ to ‘NSArray’
- Weird behaviour of Xcode 11 Debugger – Showing values as nil when there’s a value
- Rotating a view in layoutSubviews