Hi,
I'm working on a voip app using PushKit. The app should be able to receive voip push notifications in all possible app states (e.g. background, foreground, active, inactive). Using PushKit, I have to register the app with the background mode "voip" in the Info.plist - so far, so good. I still implemented the PFPushRegistryDelegate, which receives push credential updates or voip push notifications. This already works.
Here is my problem:
When the app is in suspended state and the screen is locked, the push notification will be received, but what do have to do now with that message? And what else can I do in the method didReceiveIncomingPushWithPayload?
I want to use the received voip push notification to start a file download or something else - something time consuming - and I want to do it in the background, so that the app can refresh itself in the background. But what happened is, that the app starts downloading the file in the background using background transfer service and stops working after about 4-5 seconds. It seems, that the app will be suspended by iOS after the push notification has been received.
What is the idea of the method didReceiveIncomingPushWithPayload?
What shall I do in this method, when time consuming things are forbidden?
I'm grateful for any help!