在锁定屏幕和enabledRemoteNotificationTypes中查看 - iOS5 [英] View In Lock Screen and enabledRemoteNotificationTypes - iOS5

查看:239
本文介绍了在锁定屏幕和enabledRemoteNotificationTypes中查看 - iOS5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚对这里返回的结果进行了一些测试

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

-(UIRemoteNotificationType)enabledRemoteNotificationTypes

我在 applicationDidBecomeActive 委托方法中调用它并登录结果。
设置警报,徽章或声音时工作正常。

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

然而,当我的app推送设置中只设置了在锁定屏幕中查看设置时, enabledRemoteNotificationTypes 仍然返回 UIRemoteNotificationTypeNone

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 ?

推荐答案

你不能。 API仅提供有关声音,徽章和警报的信息。

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

这篇关于在锁定屏幕和enabledRemoteNotificationTypes中查看 - iOS5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆