Hi,
I'm working on an app that uses an XMPP client library, which I believe is based on TCP sockets.
When the app is running, it can get callbacks from the XMPP code to alert it of incoming messages. Of course, this stops working when the app goes into the background or the phone locks.
Is there any way to keep this working in the background? Ideally we'd like to be able to receive an XMPP message and if the app is not in the foreground, we'd post a local notification.
You may be wondering why we don't just use push notifications. The answer is because the app we're building is going to be used in a medical facility, and the customer wants to restrict it to a private LAN with no internet access (the XMPP server is on the LAN). Therefore we won't be able to receive or send messages through APNS.
The app will not go into the app store, it will be distributed through enterprise distribution. We're hoping that this allows us some more flexibility with background processing.
We know that apps can play audio continuously in the background and we had the idea that we might be able to play a silent audio stream to keep our app alive, but we think this is a hack and would prefer a better solution.
Thanks,
Frank