As part of our sync solution I'm looking at ways the server can notify the device that there's new data. Websockets is an obvious choice but push notifications might be even easier, if it can do what we want. We just want the server, in a reasonably timely manner, to notify the device that there's new data. But only if the app is in the foreground. Background notifications are not appropriate in this case because a) Apple limits the number, and b) we don't require the app to be notified if it's in the background. When it comes to the foreground the first thing it will do is ask if there's new data.
With APNs can I send an always-silent, no UI, ignored in the background push notification?
To be clear, I'm not asking about background notifications. I want the app to be notified only when it's in the foreground. And I don't want any UI. I just want the app to notice and then do its thing. But only when it's in the foreground. If it's in the background, I don't want the notification to appear in the UI and I don't want the app to even respond.
Anyone had success with this with APNs? If this isn't possible with APNs, what have you used for this?