【问题标题】:No sound in Parse push notification for ios8ios8 的 Parse 推送通知中没有声音
【发布时间】:2014-10-17 11:54:23
【问题描述】:

我遇到了向 iOS8 设备推送通知的问题。一切正常,但推送没有响起,只出现在屏幕上。 我通过仪表板发送正常推送,默认情况下启用声音。我在 iPhone4 (iOS 7.1.2)、iPhone5 (iOS 7.0.4) 上测试过,运行良好,但在 iOS 8 上没有声音。 谢谢

编辑:

1) 我们已经修改了代码来处理 ios8 的更改推送通知注册。下面是代码sn-p:

// 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)]; }

2) 更改任何和所有配置设置也无济于事,重启设备也无济于事。

【问题讨论】:

标签: push-notification parse-platform ios8 audio


【解决方案1】:

似乎您在请求 JSON 中需要这个:"sound": "default"。以前可以使用空白,但现在需要“默认”才能使用默认声音。

【讨论】:

    【解决方案2】:

    iOS 8 更改了推送注册方法。请检查以下可能性..

    1)检查您是否注册了带有声音的推送通知this link

    2)另一种可能是通知中心可以关闭声音。检查设置->通知中心->点击应用并启用声音。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-01-14
    • 1970-01-01
    • 2017-07-05
    • 1970-01-01
    • 2020-05-26
    • 2015-04-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多