Apple Push - didReceiveIncomingPushWithPayload not called - instead error: Failed sending message to client

六月ゝ 毕业季﹏ 提交于 2019-12-21 20:28:34

问题


I have an app that uses pushkit (voip push). Most of the time the pushes get through. But when there is a lot of traffic, the pushes don't get through to the app. I am in a state where I can somehow reproduce the error.

I used the extended logging from here: https://developer.apple.com/library/ios/technotes/tn2265/_index.html

And I found this to examine the logging: http://iosdevelopertips.com/core-services/debug-failed-push-messages-by-logging-apsd-process.html

Still, I got two different cases, where I just don't get further: - In the apsd-log I get

Received message for enabled topic ...

and in the app the didReceiveIncomingPushWithPayload is not called. I produce a log entry right at the start of the function and do nothing special that could prevent the function from finishing. - In the apsd-log I get

Stream error occurred ...

but do not find any other error messages, why this error occurs. The Port seems ok

After restarting the app the pushes get through again.

EDIT:

The relevant error in the log file seems to be:

apsd[82]: Failed sending message to client: com.apple.telephonyutilities.callservicesdaemon.voip.push.development

There seems to be two types of cases: In some cases, which are reproducable with large traffic, reregistering the pushkit seems to help.

In other cases, which occur random, it simply does not. Restarting the app does not help here either. All helps so far, is restarting the iphone.

EDIT:

I am still struggling with this problem. In some cases I get a memory warning before the push seems to fail. In other cases I get a xpc communication warning like this:

SpringBoard[43] <Warning>: Communications error: <OS_xpc_error: <error: 0x3b7ef614> { count = 1, contents =
    "XPCErrorDescription" => <string: 0x3b7ef86c> { length = 22, contents = "Connection interrupted" }
}>

In some cases none of the above happens, but push still does not work.

EDIT: In developer archive I found this very interesting thread, but still no answer: https://devforums.apple.com/thread/257354?start=50&tstart=0

Does anybody know if there is a connection between xpc and push? And is there a way to detect a xpc error in code?

来源:https://stackoverflow.com/questions/32694731/apple-push-didreceiveincomingpushwithpayload-not-called-instead-error-faile

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