Steven
Steven

Reputation: 101

IOS 8 Silent push notification not working without Xcode

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...

Upvotes: 10

Views: 1707

Answers (4)

Rafael
Rafael

Reputation: 117

I know this questions is old but, according to Apple documentation, receiving and processing of silent push notifications depends on the conditions of the system, so I think that because you have a power supply, device will not throttle the delivery of notifications. Here is what Apple says:

Important

The system treats background notifications as low-priority: you can use them to refresh your app’s content, but the system doesn’t guarantee their delivery. In addition, the system may throttle the delivery of background notifications if the total number becomes excessive. The number of background notifications allowed by the system depends on current conditions, but don’t try to send more than two or three per hour.

Upvotes: 0

Igor Kovryzhkin
Igor Kovryzhkin

Reputation: 2215

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

Upvotes: 1

Ablert Gu
Ablert Gu

Reputation: 21

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!

Upvotes: 1

if0xx
if0xx

Reputation: 21

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).

Upvotes: 0

Related Questions