View In Lock Screen and enabledRemoteNotificationTypes - iOS5

荒凉一梦 提交于 2019-12-06 11:37:49

问题


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.



来源:https://stackoverflow.com/questions/9276154/view-in-lock-screen-and-enabledremotenotificationtypes-ios5

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!