问题:当 app 处于后台和关闭时,无法接收 pushmessage
当app 处于后台的无法收到push message的解决方法:我也不知道,后面是老大说后台配置错了,然后改了后台的东西之后,就可以接收了。
当 app 关闭的时候无法接收 push message 的解决方法:官方回复我如下:
——————————————————————————————
For receiving push messages while app is closed, could you please try adding priority=high to your payload? You could check this StackOverflow post for reference
——————————————————————————————
原本的priority是5,后来改成10。(我也不知道这是什么意思)
ps:检查项目工程中的 Capabilities中的 BackgroundModes是否打开 remote notification。
另外虚拟机无法获取device token