Subject: iOS - Keeping XMPP connection alive in background
After the user presses the home button, is there any way to keep the app's XMPP connection alive? If not, what is a good solution for this issue, to allow the user to continue to be notified they have received a message? I know that you can do this by stating the app uses VOIP or location services, but our app doesn't at this time, so it would be rejected by the app store if we tried to submit it.
The only thing I can think of is to disconnect the XMPP session when the user presses the home button, and then reconnect when the app is resumed. Our server already sends push notifications to users whose presence is set to offline, so this can work. But I just feel that disconnecting/reconnecting to the XMPP server each time the app is opened/closed is a bad idea. Thanks
The only thing I can think of is to disconnect the XMPP session when the user presses the home button, and then reconnect when the app is resumed. Our server already sends push notifications to users whose presence is set to offline, so this can work. But I just feel that disconnecting/reconnecting to the XMPP server each time the app is opened/closed is a bad idea. Thanks