CallKit的呼叫目录扩展名可用于阻止标准电话。但是,应该如何阻止VoIP呼叫与iOS 13一起使用?
When there is a VoIP call your app receives a VoIP push, but now with iOS 13 Apple are mandating that when the push is received the app must call CXProvider.reportNewIncomingCall()
.
However when reportNewIncomingCall() is called, the OS displays an incoming call screen (which is not the same as for a regular incoming call). It is apparently not possible for this call screen to be suppressed, and even if reportNewIncomminCall() is invoked with a parameter which is a number which has been registered as blocked with the CallKit extension, the call screens still being displayed.
So it would seem it is impossible for an application to offer the ability to block a VoIP phone call (unless the app sends its list of blocked numbers to the server, and the server doesn't send the push for a particular handset for blocked numbers. But if the app is installed in hundreds of thousands or millions of handsets, that's a large undertaking on the server side to implement).
我和Apple Voip工程师有一些往来。苹果公司期望如果您需要阻止Voip呼叫,则需要在服务器而不是听筒上进行。