I am writing a VoIP app which uses CallKit for when the app is in the background. Largely everything works fine, and CallKit does a nice job of pushing the app when it is in the background during an incoming call.
As far as I understand, once in the background and all outstanding tasks have been finished, the app goes into 'hibernation' and stops communicating with the outside world. The only way now for the app to come back alive is when the iOS operating system tells it to -- when an incoming VoIP call is detected by the operating system, it will pass this on to the app and the app will come back alive and take the call.
My question is: occasionally my app crashes or the user gets logged out, in which case it cannot take calls. If it's in the background when this happens, how can I find out? I'd like some way of telling the caller that he can't call because the receiver is unreachable? iOS operating system will still try to push.