How to Use Call Directory Extension to Identify a Incoming Call in My Application

How to use call directory extension to identify a incoming call in my application?

If this question is not how to write a call directory extension, but how to get the number of an incoming call, which I think is what the question is, then its not possible.

The call directory extension is not involved when there is an incoming call. All it does is register numbers that get stored in an internal SQL database that is private to the phone app. The call directory extension does NOT get run when there is an incoming call and therefore it and your app are not able to identify the number of an incoming call, this is the same as it has always been, it has not changed in iOS 10.

There is new functionality for call detection for Voip apps that was added in iOS 10, but if you are not a voip app you still cannot obtain the number of an incoming (or outgoing) call.

How to call `beginRequest` of Call Directory Extension?

I think it is being called correctly as you can check the response on your app target sandbox.

The only way I know to get access to the logs in this case is by going in the Devices window of Xcode and looking at the device console, you should be able to see logs like this:

com.apple.CallKit.CallDirectory: ...

You might also try to debug it by putting directly a breakpoint in this line:

print("test")

Check also tutorials on finding out if you have any issue in the setup between your extension and your app sandboxes, there is a good one here: https://pusher.com/tutorials/callkit-ios-part-1

What method is called when incoming call is blocked by call directory extension

No method is called. There is no way to know when the device has blocked an incoming call from a number provided by your CallKit extension.

Your extension provides a list of numbers that should be blocked. These are transferred from your extension, out of your sandbox and into the device's phone app. The phone app refers to this list when an incoming call is received and takes a block action if required.

Your extension is not involved in this process.

Any visibility of the numbers that were blocked would be a potential privacy violation.

Call Directory Extension CallKit does't recognize numbers with more than 9 digits

Well, after a bunch of tests I could made it work. The point was that the phone must contain the full country code and the area code. So for example 00_52_55_4567_8932 877 or +52_55_4567_8932 both will work. But 55_4567_8932 and 4567_8932 will not work. I hope this can help someone else in the future. Thank you all!



Related Topics



Leave a reply



Submit