简体   繁体   中英

Access App Notification Settings for Lock screen on iOS 8

Q : In iOS 8 we have a bunch of preferences available to the user in the Settings->Notifications->(App name) like "Allow notifications" & "Show notifications on Lock screen" etc. Is it possible to programmatically set/access these user settings ?

Background : I have push notifications enabled in my app and successfully registered the device. But it seems that the call to isRegisteredForRemoteNotifications: always returns NO , if the user has chosen to set the display alert type to None.

Why this behavior ? Even if the user has enabled "Allow notifications" & "Show notifications on Lock screen", it should mean that I as a user only want to see my notifications on the lock screen but not alert me when it's unlocked. Am I missing something ?

It seems there's no way to access this information directly. I guess Apple wants to make sure that user's preferences aren't overridden by programmers. (Ex: Spam push 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