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

查看:136
本文介绍了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.

我已经验证了有效负载,并且根据Apple文档的格式正确:

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天全站免登陆