How to keep an XMPP connection in an iOS app when the app is in the background?

I created a basic chat application with an XMPP server in swift 2 (from this lesson:) http://shubhank101.imtqy.com/iOSAndroidChaosOverFlow/2016/08/Chat-Application-Using-XMPP-Swift-Tutorial. My app works well. but when my application went into the background image, my application was not able to receive any message from the XMPP server. I think this is due to an XMPP connection interruption when entering the application in the background.

I tried to find help on google for the same, but nothing was found related to Swift 2

Please help me. if someone put some sample code that would help me a lot because I'm new to iOS development.

+4
source share
2

iOS . . Apple, .

0

Source: https://habr.com/ru/post/1672467/


All Articles