每一个推送通知横幅显示两次iOS9 [英] Every Push Notification Banner is shown twice on iOS9

查看:877
本文介绍了每一个推送通知横幅显示两次iOS9的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于几个小时我们在iOS应用中有一个奇怪的问题:iOS版的主屏幕上每收到推送通知会触发它们之间有2秒延时自拍/显示相同的通知旗帜两次

Since a few hours we have a strange issue in our iOS app: every push notification received on the home screen of iOS will trigger/show the same notification banner twice with a 2 sec delay between them.


  • 这只是发生在与iOS设备9.x中在iOS设备8.x的一切仍工作正常。

  • 如果我设置一个断点 - [AppDelegate中的应用:didReceiveRemoteNotification:fetchCompletionHandler:]它只是对每个推送通知调用一次

此外,我们的确在后端没有改变最近(至少一个弱),这也恰好为这些已经发布的客户端,我们是100%肯定,我们没有看到过这个问题。

Also we did no change in the backend recently (at least a weak) and it also happens for client which are already released and we are 100% certain we did not see the issue before.

我们也不过改变的能力在当前的开发应用程序的X code和必须产生新的供给曲线是旧的,其中标记为无效。

We did however change the capability in Xcode of the current development app and had to generate new provisioning profiles as the old ones where tagged as "Invalid".

因此​​,对于我们来说,这看起来像苹果双方的问题。任何建议什么更多的尝试/检查或做什么?

So for us it looks like an issue on Apple sides. Any suggestions what more to try/check or what to do?

推荐答案

好像我有完全一样的问题,因为这家伙有:我叫 [registerUserNotificationSettings:] 两次

It seems like I had exactly the same issue as this dude had: I called [registerUserNotificationSettings:] twice.

要知道,当你想看到,如果你调用的方法一次或两次,它可能不是那么明显:

Be aware that it might not be as obvious as you think to see if you called the method once or twice:

我把它叫做一次在特定的UIViewController的目的。不幸的是我也把它称为在 didFinishLauchingWithOptions每次:别让因为你看到的对话框只有一次自己被愚弄了。

I called it once on purpose in specific UIViewController. Unfortunately I also called it each time in didFinishLauchingWithOptions:. Don't let yourself be fooled because you see the dialog only once.

如果你想一定要在中增加日志输出 - [AppDelegate中的应用:didRegisterUserNotificationSettings:] 。在我的情况下,回调被打了两次电话,我打OK的权限对话框后。

If you want to be sure add a logging output in -[AppDelegate application:didRegisterUserNotificationSettings:]. In my case the callback was called twice after I hit OK on the permission dialog.

由于我删除 didFinishLauchingWithOptions的错位电话:我没看到了双重通知

Since I remove the misplace call in didFinishLauchingWithOptions: I did not see anymore double notifications.

这篇关于每一个推送通知横幅显示两次iOS9的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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