ios中没有声音8 Parse push [复制]

ios中没有声音8 Parse push [复制],第1张

概述参见英文答案 > No sound in Parse push notification for ios8                                    2个 这很奇怪,在更新我的应用程序以支持通过Parse发送的iOS 8推送通知(使用Parse仪表板)后,推送通知不会发出任何声音. 我在Stackoverflow上发现了这个重复,但发布的答案对我不起作用:No soun 参见英文答案 > No sound in Parse push notification for ios8                                    2个
这很奇怪,在更新我的应用程序以支持通过Parse发送的iOS 8推送通知(使用Parse仪表板)后,推送通知不会发出任何声音.

我在Stackoverflow上发现了这个重复,但发布的答案对我不起作用:No sound in Parse push notification for ios8

>我已经检查了通知中心,并启用了消息和声音.
>创建了一个新的应用程序清洁版本
>检查其他推送消息是否在应用程序上发出声音
>使用Parse rest API并将声音设置为默认值.

我尝试过的所有事情都没有.

使用解析代码更新了我的应用:

// Register for Push Notitications,if running iOS 8if ([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修复​​此错误之前,这是一种解决方法.

总结

以上是内存溢出为你收集整理的ios中没有声音8 Parse push [复制]全部内容,希望文章能够帮你解决ios中没有声音8 Parse push [复制]所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1022607.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-23
下一篇 2022-05-23

发表评论

登录后才能评论

评论列表(0条)

保存