Silent push notifications and iBeacons

I developed a small iBeacon based application when the application detects that one of our iBeacons is making a call to a web service to get a dataset and send a local notification to the user. This all works correctly.

Now I realized that these local notifications can change over short time intervals with new content. The problem is that if the user does not leave the iBeacon and repeaters area, the application will not "wake up" and the user will not receive a new updated notification.

After asking for advice on how to fix this problem, someone suggested using remote notifications. While reading about this I found silent remote notifications, but I'm not sure if I can use them the way I think.

My idea is that when a notification is modified or created and associated with an iBeacon on the server, you send a silent push notification to the app so that it "wakes up" if not in the foreground. This way, when the application "wakes up", you can take a few seconds, and if any iBeacon detects and sends a new notification.

Is this possible and acceptable? Can I send all silent push notifications I want, or is there some kind of limit? thank

+3


source to share


1 answer


This is possible and acceptable. You can learn more about this in the "Using Push Notifications to Initiate the Download" section here:

https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html

However, there are several disadvantages:



  • Remote notifications can be slow and in fact aren't even guaranteed by Apple to come to everyone.

  • They have a bit of a headache to tweak, given that you need to create a server infrastructure to send.

A less timely alternative is to simply update periodically, but the OS usually only allows your application to do this once a day. See Getting Small Amounts of Content. Opportunistic here:

https://developer.apple.com/library/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html

+1


source







All Articles