IOS 8 Silent push notification not working without Xcode
Asked Answered
U

4

10

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

Unman answered 30/1, 2015 at 15:39 Comment(10)
Hey Steven, did you find an answer to this issue? I am running into a similar situation with and iPhone5 + iOS8 and it seems that is related to power management. Does not happen in iPhone 4s iOS7.1. Have you had any luck?Ornie
Did you find an answer to this issue? I'm running into the same problem where the silent notification will not work unless I'm running the application via Xcode to my device.Tarragona
Me too. It's wired. What's the difference between connecting to Xcode and unconnecting...Debbi
My problem is that device can receive silent notifications. But application:didReceiveRemoteNotification:fetchCompletionHandler: is not called.Debbi
When I run the app with connecting to Xcode, application:didReceiveRemoteNotification:fetchCompletionHandler: is called. It's very wired.Debbi
I read more details. Yes! application:didReceiveRemoteNotification:fetchCompletionHandler: is called on background with connecting to power source. Xcode is not matter.Debbi
I am seeing the same issue. The issue appears to be sporadic. The power element doesn't appear to make it always work for me though, although Xcode running does. I am finding that even coupling content-available 1 with an alert, badge or sound doesn't guarantee a content fetch. However, the alert / badge / sound does appear, so the alert is arriving on the device. If I use Xcode simply to connect to the console, and NSLog the ADRRN:FCH I note that this is not always being called, even though the alert, etc is displayed.Tutu
@Unman Any luck regarding the problem. I'm facing the same issue.Steersman
@Unman In your binary notification, what is the priority tag set to? I had a similar issue. See: #28835556 I answered how it fixed mine. I will also mention that when your application is running via Xcode. Notifications are not throttled at all. So every notification will work when your testing w/ Xcode. They also do throttle the notifications based on battery life.Tarragona
Hey steven, its not about that device is connected to XCode and push notification working. I am facing the same issue. If the app is in background then it calls the delegate method and not called when app is not running. Did you find any solution?Bentonbentonite
D
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!

Disuse answered 5/6, 2015 at 2:5 Comment(0)
Q
1

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

Quarantine answered 21/7, 2017 at 10:1 Comment(0)
E
0

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

Ejecta answered 30/1, 2015 at 17:25 Comment(2)
Thanks for the reply, yes, I'm sure that it is delivered to my phone while it's connected to Xcode or power source. I've added a LocalNotification into didReceiveRemoteNotification:fetchCompletionHandler to present a local notification the moment I receive a silent push. Also, when this method is called, it will also report some information back to the server via HTTP and therefore I can track by tailing my server log.Unman
Not network issue. iOS receive silent push notification and display it. But application:didReceiveRemoteNotification:fetchCompletionHandler: is not called without power source.Debbi
N
0

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.

Nitz answered 15/11, 2019 at 15:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.