jotshin
Hello,
I'm wondering what the method implemented in your iOS SDK so that it's not forced to go to suspended mode?
Currently I'm tracking the delegate
[SYNTAX=iOS]- (void) clientConnection :Smile_Ac: LSClient *)client didReceiveConnectionFailure :Smile_Ac: LSPushConnectionException *)failure[/SYNTAX]
and found out it's very often called, even if the app goes to background.
Could this be correct? If yes, how could we control the behaviour? By close the connection by ourselves?
Thanks in advance for your answer,
Joseph
gianluca.bertani
Hello Joseph,
the delegate method clientConnection:didReceiveConnectionFailure: is called each time the network connection to the Lightstreamer Server fails for some reason. It is also called when the app goes to background mode because iOS automatically closes any active connection. There are some cases where connections are kept active in background (e.g. VoIP, scheduled downloads) but Lightstreamer connections are not one of them.
Anyway, the Lightstreamer Client for iOS is able to reconnect and resubscribe automatically when the network is available again, or when app returns to foreground. Unless you have a specific reason to manually disconnect and reconnect, the correct behavior is to simply do nothing and let the client reconnect automatically.
Let us know if you need any further help.
Best regards,
Gianluca