gpt4 book ai didi

push-notification - ios8的解析推送通知中没有声音

转载 作者:行者123 更新时间:2023-12-04 23:21:10 26 4
gpt4 key购买 nike

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

编辑:

1)我们已经修改了我们的代码来处理ios8的更改推送通知注册。下面是代码片段:
// 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) 更改任何和所有配置设置也无济于事,重启设备也无济于事。

最佳答案

看起来你在请求 JSON 中需要这个:"sound": "default" . Blank 过去可以工作,但现在需要“默认”才能使用默认声音。

关于push-notification - ios8的解析推送通知中没有声音,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26424478/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com