webex / spark-ios-sdk

DEPRECATE. Check our newer iOS SDK
https://github.com/webex/webex-ios-sdk
Other
35 stars 15 forks source link

Open websocket for incoming calls when app is in background #60

Open rikvdbrule opened 6 years ago

rikvdbrule commented 6 years ago

To enable incoming calls when the application is in the background and smooth CallKit integration, we made some changes within the SparkSDK itself. Our use case is the following:

We would like to know if either this implementation could be officially supported (by merging this PR or a modified version of it into the main repository), or whether there is a different flow for background calls that we should follow.

Noble-Six commented 6 years ago

Hi @rikvdbrule @buh, if the app wants to fetch incoming call in background mode, we recommend use Phone.register/deregister. Because of WebSocket URL probably expired during the disconnected time. When calling the API register(), SDK will update the WebSocket URL first and then open a new WebSocket. Call the deregister() to disconnect the WebSocket after background task end.