-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remote push notifications not received until restart #94
Comments
Here's the data that I'm pulling this from. |
If there are networking issues (such as in concrete city hall type areas) then neither didRegister, nor didFailToRegister method is called. Delegate method is called once device can make connection. Is this also true if the app has been suspended or killed in the interim? https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/IPhoneOSClientImp.html On the plus side, there is a method to check whether we are currently registered for remote notifications.
So I guess we can do this check in the visit notification code and maybe exit geofence code as well, and re-register if we are not currently registered. |
Here's some more evidence that it occurs occasionally.
|
So occasionally, we end up with no remote push notifications on iOS. This is not a problem with the remote push gateway or server code because other iOS phones do get the notification at the same time.
Example:
and then no further notifications until at least
2016-02-26 12:00:00
.This could be due to several reasons:
So it seems like if we start registering remote push notifications, but the background task doesn't complete, we won't log anything - neither that we started, nor that we failed. But we should still have the previous registration on parse, so it is not clear why this will fail. But maybe attempting a registration that then fails then causes remote pushes to fail.
Unfortunately, unlike #92, this is a hard problem to work around. If the push notifications are skipped because of poor connectivity, it is not clear what a reasonable solution/workaround would be. There's no point in re-registering since re-registering requires talking to a remote server and is likely to fail anyway. If the lack of remote pushes is due to something else, we could try re-registering when we get other calls - e.g. during visit notifications. But again, we can't know whether we are currrently registered, so we would need to re-register every time, which seems like overkill for a background operation.
Let's add some more logging and try to determine what exactly is going on before mucking with this further.
The text was updated successfully, but these errors were encountered: