I was doing some searching trying to get some answers on what could be causing this issue and saw an answer that said to use a serial queue to get past this issue. I am using a serial queue but still facing issues with getting VoIP notifications to come through while app is in background or in a killed state. While it is in the foreground everything runs great and as expected. I referred to this documentation and a post on here about the serial queue.
https://developer.apple.com/documentation/pushkit/pkpushregistry/1614494-init
(In the Parameters section it very briefly states that you need a serial queue).
Any help would be much appreciated. The most difficult part is that there aren't any logs for me to follow on this issue.
Here is relevant code
var voipRegistry = PKPushRegistry.init(queue: DispatchQueue(label: "voipQueue"))
self.pushKitEventDelegate = notificationHandler
self.voipRegistry.delegate = self
self.voipRegistry.desiredPushTypes = [PKPushType.voIP]
Relevant outputs:
-Running from foreground
pushRegistry:didReceiveIncomingPushWithPayload:forType:completion:
-Running from background
-Running from Killed state
Selecting any option will automatically load the page