Reputation: 9869
This is more of an is-it-possible question.
I am building a pubsub application for the iphone using XMPPFramework and Openfire. When the user has the pubsub app in the background, the app sends "keep alive" packets every 10 minutes or so to keep a persistent connection. Any messages delivered will show up as local notifications.
But what about if the user has killed the app or it's been a week since they've used it and the app isn't in the background? How would they know that they have a message waiting for them?
Is it possible to combine Openfire's pubsub service with Apple's push notifications? Am I on the right track? Thanks!
Upvotes: 3
Views: 2573
Reputation: 56
The limitations you're envisioning were constructed purposely to only allow certain types of applications to run in the background with long-lived connections indefinitely (namely, VOIP applications). You could experiment with setting the UIBackgroundModes key to 'voip' (see: Apple's Documentation).
Non-VOIP applications don't have this luxury (presumably as a safeguard against battery life or network utilization issues) and won't be permitted in the appstore if they have the VOIP UIBackgroundModes value set.
Consideration of Apple's Push Notification Service is definitely the right approach, IMHO.
Upvotes: 1