简体   繁体   中英

How can I tell whether push notification is not registered yet or has been turned off?

More specificly, I want to know if the push notification settings for my app are available in the Settings App. If they are available, I want to open it from my app (using deep link). I they are not, I want to ask the user to register for push notifications in my app.

I tried checking UIApplication.shared.isRegisteredForRemoteNotifications , but it returned false for both cases.? I need to support iOS 9 and above.

You don't need permission to register for remote notifications; you can just do it.

What you do need permission for is to display notifications . The permission request is the same, whether you want to display local or remote notifications.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM