reason: 'Killing app because it never posted an incoming call to the system after receiving a PushKit VoIP push callback.'

故事扮演 提交于 2020-04-16 10:06:05

问题


I'm looking for solutions but I has find nothing yet. My app receives only VoIP pushes and after iOS 13 I'm not able to receive push when the app is in background mode anymore. I looked other questions but I was not able to solve my problem with solutions proposed. There's someone who can help me?

On iOS 13.0 and later, incoming Voice over IP calls must be reported when they are received and before the didReceiceIncomingPush() method finishes execution, using the CallKit framework, or the system will terminate your app.

Repeatedly failing to report calls may prevent your app from receiving any more incoming call notifications.

Basically, you can no longer use VoIP pushes for non VoIP messaging, and will need to use regular push notifications for those.

I read this announce but in my app for particular types of push VoIP I can't use function reportNewIncomingCall() because it requires params like: uuid, handle, hasVideo ecc. And these params are not present in the payload.


回答1:


Since iOS 13 you can only use VoIP pushes for reporting incoming calls. For pushes that are not incoming calls, you must use other alternatives (take a look at this answer here).

Repeatedly failing to report calls may prevent your app from receiving any more incoming call notifications.

From my tests, it seemed to block all VoIP pushes after failing to report only 2 or 3 times, and it would stay blocked for around 24h.

because it requires params like: uuid, handle, hasVideo ecc. And these params are not present in the payload

If you receive a VoIP push for a new incoming call, but stil don't have the required info you listed above, you can initialize the call with "dummy" values, and later update them. As for example, setting the remoteHandle to CXHandle(type: .generic, value: "Connecting...") and later updating it with the correct value:

cxCallUpdate.remoteHandle = CXHandle(type: .emailAddress, value: "email@mail.com")
cxProvider.reportCall(with: callUid, updated: cxCallUpdate)



回答2:


This is not a payload issue. You can create your own payload. Just you have to call below function in this callback.

func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, for type: PKPushType, completion: @escaping () -> Void)

Otherwise, Apple is blocking push notifications for a time.

provider.reportNewIncomingCall(with: uuid, update: update) { error in
completion() }


来源:https://stackoverflow.com/questions/58911755/reason-killing-app-because-it-never-posted-an-incoming-call-to-the-system-afte

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!