IOS 8 Silent push notification not working without Xcode

匿名 (未验证) 提交于 2019-12-03 08:36:05

问题:

I'm trying to test out the silent push notification and I notice that my Iphone (IOS 8) can only receive silent notifications when my device is connected to Xcode. While it is unplugged, I can only receive one silent push in probably 5-10 tries. This only happen to IOS 8 because I have another phone which is running on IOS 7 and not even a single silent push is missed. Anyone face the same issue ?

More details: If the phone is connected to power source, I'm able to get silent push notifications perfectly...

回答1:

I have encountered similar issue. If my iPhone connects to the Xcode, it can be woken up successfully by silent push notification. However, if it disconnects to the Xcode, silent push notification can ONLY be received without being woken up to perform background fetch.

The root cause for my case is that I turned off the "Background App Refresh" on my device. ("Settings > General" > "Background App Refresh")

After I turn it on, my iPhone can work as expected again.

Good Luck!



回答2:

Seems like you are using Debug certificate while interacting with APNs from the server side. And it only works while a device is in the debug mode.

For untethered push notification handling, you need to use Release certificate.

This article would give a better understanding on using certificates with APNs: https://quickblox.com/developers/How_to_create_APNS_certificates



回答3:

Sounds like a network issue to me. Are you sure that the PNs are actually delivered to your phone?

You could disable cellular radio (PNs are always delivered over cellular data even if on wifi) and use, e.g., tcpdump in promiscuous mode on your local wifi in order to see if there's anything coming in. Just look for packets from 17.x.x.x. Apple warned us they'd rate limit silent PNs, maybe that's the issue here (while that wouldn't really explain why it works while your phone is plugged in).



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!