Reputation: 29
Is there any way to notify my video chat application that there is an incoming video call when the app is in the terminated state? (Like an Android background service.)
I notify of incoming calls via socket when the application is in the running and background states.
Upvotes: 2
Views: 124
Reputation: 9898
Let me know if you need any help in push kit implementation.
Upvotes: 0
Reputation: 3456
App that are using VoIP are treated differently by apple and have more privilieges. In the past, that meant keeping a permanent connection to the server to get notified when a call occurs.
This was not very efficient in terms of energy saving.
Since iOS8 it is recommanded to use PushKit (the push notification API) to notify your user when a call occurs. Apps with VoIP privileges will be notified on the spot and that can wake up your app whatever the state it's in.
Here are the world from apple :
Instead of persistent connections, developers should use the PushKit framework—APIs that allows an app to receive pushes (notifications when data is available) from a remote server. Whenever a push is received, the app is called to action. For example, a VoIP app could display an alert when a call is received, and provide an option to accept or reject the call. It could even begin taking precursory steps to initiate the call, in the event the user decides to accept.
Upvotes: 2