iOS的应用程序从通知中心失踪 [英] iOS application missing from notification center

查看:124
本文介绍了iOS的应用程序从通知中心失踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:
该应用程序不会出现在通知中心,并通过 registerForRemoteNotificationTypes无法安装完成并推送通知的应用注册后立即收到推送通知:

详细内容:


  • 重启设备后,一切都工作得很好后,应用程序通常出现在通知中心。

  • 有时在应用程序通知中心显示了安装纸和登记的APN之后(我还无法证实这一点,但我觉得我在这样的情况下跌跌撞撞)。

  • 应用程序调用该方法每次 registerForRemoteNotificationTypes 用户登录,每次分别在用户注销与位掩码( UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound )和 UIRemoteNotificationTypeNone

  • enabledRemoteNotificationTypes 返回正确的值。

  • 最初我用注销方法 unregisterForRemoteNotifications ,但我把它改为 registerForRemoteNotificationTypes:UIRemoteNotificationTypeNone 由于suspicians这可能是造成问题的原因。

  • 在这两种发展出现此问题,并即席构建和无关的应用程序是否利用x code或iTunes安装。

  • The app usually appears in notification center after the device is restarted and after that everything works just fine.
  • Sometimes the app shows up in notification center right after intallation and registration for APNs(I still can't confirm this but I think I stumbled upon such situations).
  • The app calls the method registerForRemoteNotificationTypes each time a user logins and each time a user logouts respectively with bit masks (UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound) and UIRemoteNotificationTypeNone.
  • enabledRemoteNotificationTypes returns correct values.
  • Initially I used the method unregisterForRemoteNotifications on logout but I changed it to registerForRemoteNotificationTypes:UIRemoteNotificationTypeNone due to suspicians that this could be causing the problem .
  • This problem occurs in both development and adhoc builds and irrespectively of whether the app is installed via xcode or itunes.

有什么想法和建议将大大AP preciated。谢谢!

Any thoughts and advices will be greatly appreciated. Thank you!

推荐答案

这是发生在我的一些设备。 (没有出现在通知中心,而不是接收推。)

This was happening to some of my devices. (Not showing up in notification center and not receiving pushes.)

管理人做来解决它:


  • 删除应用程序

  • 从设备中删除所有相关的配置文件。设置应用>常规>模式,然后轻按到每个相关的您的应用程序的部署配置文件中,然后点击删除。在iOS 8/9,这里的设置不再存在,使用X code>窗口>设备>选择设备>显示配置文件...>然后删除该配置文件(S)

  • 关闭手机,然后再打开。

  • 给5分钟

  • 重新安装应用程序,该供应配置文件应该得到自动安装。

  • 启动应用程序,让它注册之类的东西。

  • 测试再次推通知

对于我们来说,没有马上工作,所以给它几分钟。

For us, it didn't work immediately, so give it a few minutes.

这篇关于iOS的应用程序从通知中心失踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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