草庐IT

UIRemoteNotificationType

全部标签

ios - 如果全部启用,UIRemoteNotificationType 也是 UIRemoteNotificationTypeNone

在我的应用程序中,我检查用户是否为我的应用程序启用了通知,以启用本地通知,我是这样做的:UIRemoteNotificationTypetypes=[[UIApplicationsharedApplication]enabledRemoteNotificationTypes];if(types!=UIRemoteNotificationTypeNone){//Allenabled}else{//notenabled}但是我遇到了一些用户的问题,在iOS设置中都启用了,他们给我发了一个截图,一切都正确,但是代码在else语句中,好像它全部禁用了。有什么问题,有人知道我该如何解决吗?谢谢

IOS 8 推送通知检查返回错误的 UIRemoteNotificationType

我正在尝试检查是否为我的应用程序启用了PushNotifications。在AppDelegate.m中,我确实为远程通知注册了应用程序,并在iPhone(iOS8)的设置中启用了此应用程序的推送通知。我用谷歌搜索了方法:UIRemoteNotificationTypetypes=[[UIApplicationsharedApplication]enabledRemoteNotificationTypes];BOOLcheck=[[UIApplicationsharedApplication]isRegisteredForRemoteNotifications];作为结果,types=

ios - 无法使用 int 类型的右值初始化 UIRemote NotificationType 类型的参数

当我使用[[UIApplicationsharedApplication]registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge|UIRemoteNotificationTypeSound|UIRemoteNotificationTypeAlert)];注册远程推送通知时,出现错误提示无法初始化类型为“UIRemoteNotificationType”的参数'具有'int'类型的右值,有人知道为什么吗?谢谢。我的项目环境:Xcode4.2+iOS5。 最佳答案

ios - Parse.com UIRemoteNotificationType 已弃用

按照Parse.com的推送通知教程,我将此Swift代码放入我的应用程序didFinishLaunchingWithOptions方法中://RegisterforPushNotiticationsifapplication.applicationState!=UIApplicationState.Background{//Trackanappopenhereifwelaunchwithapush,unless//"content_available"wasusedtotriggerabackgroundpush(introducediniOS7).//Inthatcase,wesk

ios - Parse 中发送的推送为 0

所以那里有很多问题和答案,但没有一个对我有用。当我转到解析仪表板时,每个人都有2台设备,但是当我发送推送时,它说推送已发送0。它们都是iOS设备,我正在使用带有开发证书的推送门户。p12。我错过了什么? 最佳答案 如果您没有在设备上收到通知,您可能忘记调用didFinishLaunchingWithOptions中的方法initializeNotificationServicesfuncinitializeNotificationServices()->Void{letsettings=UIUserNotificationSetti