View In Lock Screen and enabledRemoteNotificationT

2019-04-15 01:03发布

问题:

I've just ran some tests here on the result returned by

-(UIRemoteNotificationType)enabledRemoteNotificationTypes

I'm calling it in the applicationDidBecomeActive delegate method and Loging the result. It works fine when alerts, badges or sounds are set.

However, when only the "View in Lock Screen" setting is set in my app push settings, the enabledRemoteNotificationTypes still return UIRemoteNotificationTypeNone.

Yes I get that sound, badge and alerts are disabled in the settings but shoudn't we have some way to detect this scenario in the App ?

In other words : How to know that the user only set the "View in Lock Screen" setting for the app ?

回答1:

You can't. The API only provides information about sounds, badges, and alerts.



标签: ios push