ios10 自定义推送通知声音未播放 [英] ios10 custom push notification sound not playing

查看:34
本文介绍了ios10 自定义推送通知声音未播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前使用 Xcode 8.0 beta 6 运行 iOS 10 beta 8,当我收到带有正确负载的推送通知时,自定义声音不会播放.

I am currently running iOS 10 beta 8 with Xcode 8.0 beta 6 and the custom sound does not play when I receive a push notification with the correct payload.

我已经验证了有效负载,并且按照苹果文档的格式正确:

I have verified the payload and it is in the correct format per the apple documentation:

{
    "aps" : {
        "alert" : "You got your emails.",
        "badge" : 9,
        "sound" : "bingbong.aiff"
    },
    "acme1" : "bar",
    "acme2" : 42
}

当我将相同的负载发送到 iOS9 上的相同版本时,自定义声音可以正常播放.

When I send the same payload to the same build on iOS9 the custom sound plays properly.

有谁知道我需要在 iOS 10 中进行任何其他更改吗?

Does anyone know if there are any other changes in iOS 10 that I need to make?

推荐答案

这个问题似乎只影响通过 Xcode 安装的应用程序.即使您稍后从其他来源更新应用程序,该问题仍然存在.

This problem seems to only affect apps installed via Xcode. The issue persists even if you later update the app from a different source.

解决方案是彻底删除该应用,然后从 TestFlight 或 App Store 重新安装.

The solution is to completely remove the app, and reinstall it from TestFlight or the App Store.

实际上,此错误不应影响您的最终用户.

In effect, this bug should not affect your end users.

编辑 2016-10-15:

Edit 2016-10-15:

不幸的是,我似乎弄错了.这似乎是 iOS 10 上的一个错误,实际上它也会影响 App Store 应用程序.如果有任何安慰的话,Facebook 和 WhatsApp 等应用程序也会受到影响.解决方案显然是强制重启手机,但不幸的是似乎没有作为开发人员,我们可以做很多事情.

Unfortunately it seems that I was mistaken. This appears to be a bug on iOS 10 that can, in fact, affect App Store apps also. If it is of any consolation, apps such as Facebook and WhatsApp are affected too. The solution is apparently to force restart your phone, but unfortunately there doesn't seem to be much we can do about it as developers.

Apple 固定问题:

基于这个评论,Apple 似乎在 iOS 10.2

Based on this comment, Apple has seemed to fix the issue in iOS 10.2

这篇关于ios10 自定义推送通知声音未播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆