VOIP notification is being missing or delay

前端 未结 1 1331
甜味超标
甜味超标 2021-01-26 11:53

How do I know that my device is blocked from receiving VoIP notifications?

The application stops receiving VoIP notifications after receiving for 3-4 times. I understand

1条回答
  •  旧时难觅i
    2021-01-26 12:23

    Actually, it seems that you aren't reporting a new incoming call for every VoIP push notification. It's true that when there is an active CallKit call, you can receive VoIP pushes without reporting a new incoming call, but it's not as simple as it might seem. Since CallKit and PushKit are asynchronous, you are not guaranteed that when you receive a push of type K.KEY.PUSHTOTALK or K.KEY.HANGUP the call has already started. Moreover, if dictPayload is nil, you fail to report a new incoming call.

    Anyway, I think that the biggest problem in your code is that you're not calling the completion handler of the pushRegistry(:didReceiveIncomingPushWith...) method. You should do the following:

    self.displayIncomingCall(uuid: appDelegate.uudiForCall, handle: (self.dictPayload!["handle"] as? String)!) { (error) in
        completion() // <---
    }
    

    and

    CallProviderDelegate.sharedInstance.provider.reportNewIncomingCall(with: uuid, update: update, completion: { error in
        completion()
    })
    // or
    CallProviderDelegate.sharedInstance.provider.reportNewIncomingCall(with: uuid, update: update, completion: completion)
    

    0 讨论(0)
提交回复
热议问题