Xcode iOS 8中的推送通知(解析)

Xcode iOS 8中的推送通知(解析),xcode,parse-platform,ios8,Xcode,Parse Platform,Ios8,在我的iDevice上安装iOS 8后,它不再接收来自Parse的推送通知。我试图从Parse发送通知,它说发送成功,但设备上什么也没发生。控制台显示该设备已成功注册以接收通知。 我正在使用以下代码设置通知 //-- Set Notification if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0) { [[UIApplication sharedApplication] registerUserNo

在我的iDevice上安装iOS 8后,它不再接收来自Parse的推送通知。我试图从Parse发送通知,它说发送成功,但设备上什么也没发生。控制台显示该设备已成功注册以接收通知。 我正在使用以下代码设置通知

//-- Set Notification
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
{
    [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]];
    [[UIApplication sharedApplication] registerForRemoteNotifications];
}
else
{
    [[UIApplication sharedApplication] registerForRemoteNotificationTypes:
     (UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert)];
}

我尝试了您所做的代码,但仅使用应用程序切换了[UIApplication sharedApplication],它在我的iOS8设备上运行良好

//-- Set Notification
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
{ [application registerUserNotificationSettings:
   [UIUserNotificationSettings settingsForTypes:
                  (UIUserNotificationTypeSound | 
                   UIUserNotificationTypeAlert | 
                    UIUserNotificationTypeBadge) categories:nil]];

    [application registerForRemoteNotifications];
}
else
{
    [application registerForRemoteNotificationTypes:
     (UIUserNotificationTypeBadge | 
      UIUserNotificationTypeSound | 
      UIUserNotificationTypeAlert)];
}

请正确格式化您的代码。我正在使用parse&iOS8,收到通知时不会出现问题。我能够使用上面的代码和以下内容使其正常工作:1。已从parse.com下载上载的解析框架。2.清理Xcode中的项目并重新生成。在我下载更新的框架之前,我的设备没有在安装表中的parse.com上注册它们的deviceTokens,iOs 8设备也没有接收推送