How to reset push notification permission on iOS
source link: https://sarunw.com/posts/how-to-reset-push-notification-permission-on-ios/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
How to reset push notification permission on iOS
Table of Contents
On iOS, when you request permission to use notifications for the first time, the system will present the following dialog asking users to grant the permission.
Notification permission dialog.
Once users choose to allow or deny the permission, their choice will be remembered. They can change the permission later in Settings.
App notification settings.
During the development, you might want to reset notification permission back to the clean state (UNAuthorizationStatus.notDetermined
) to test out every possible scenario for your app, e.g., user denies the permission.
You can easily support sarunw.com by checking out this sponsor.
How to reset push notification permission in iOS
To reset a push notification permission back to .notDetermined
to simulate a first-time run of your app, simply delete and reinstall the app.
Delete an app and reinstall it to reset notification permission back.
You may also like
A cheat sheet that tells you what colors to use to support dark mode. This is a guide for those who want to adopt dark mode, but too lazy to figure out which color to use.
iOSRead more article about iOS
or see all available topic
Enjoy the read?
If you enjoy this article, you can subscribe to the weekly newsletter.
Every Friday, you'll get a quick recap of all articles and tips posted on this site. No strings attached. Unsubscribe anytime.
Feel free to follow me on Twitter and ask your questions related to this post. Thanks for reading and see you next time.
If you enjoy my writing, please check out my Patreon https://www.patreon.com/sarunw and become my supporter. Sharing the article is also greatly appreciated.
How to use Label in SwiftUI custom view
A guideline on how to embrace a label in your custom view.
How to parse ISO 8601 date in Swift
Learn how to parse ISO 8601 date with ISO8601DateFormatter.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK