没有声音在ios 8parsing推送

这很奇怪,在更新我的应用程序以支持通过Parse(使用Parse仪表板)发送的iOS 8推送通知后,推送通知将不会发出任何声音。

我发现Stackoverflow上的这个副本,但发布的答案是不适合我: 在parsing推送通知为ios8没有声音

  • 我已经检查了通知中心,并启用了消息和声音。
  • 创build了一个新的应用程序的干净版本
  • 检查是否有其他推送消息在应用程序上发出声音
  • 使用Parse rest api并将声音设置为默认值。

没有任何我尝试过的工作。

使用parsing代码更新我的应用程序:

// Register for Push Notitications, if running iOS 8 if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) { UIUserNotificationType userNotificationTypes = (UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound); UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:userNotificationTypes categories:nil]; [application registerUserNotificationSettings:settings]; [application registerForRemoteNotifications]; } else { // Register for Push Notifications before iOS 8 [application registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound)]; } 

编辑:我发现了一个令人震惊的错误报告在Facebook的开发: https : //developers.facebook.com/bugs/719233564823090/

您可以使用JSON格式发送推送通知,而不是使用Web控制台中的文本格式,如下所示:

  {"aps":{"alert":"This is a Test","sound":"default"}} 

这是一个解决方法,直到Parse修复​​这个错误。