how to get the incoming call number by using callkit

[亡魂溺海] 提交于 2019-11-26 14:46:34

问题


How to get the incoming call phone number programmatically by using call kit framework. i tried with cxcallobserver class but no use.

Any suggestions most helpful...


回答1:


When using CallKit's Call Blocking & Identification feature (new in iOS 10), phone numbers to be blocked or identified are loaded by your app's Call Directory extension prior to an incoming call and the phone numbers are stored by the system. Then, when an incoming call arrives, this stored data is consulted by the system and an incoming call may either be blocked or identified in the incoming call UI with the label provided.

For privacy and performance reasons, Call Directory app extensions are not launched when incoming calls arrive and an app extension cannot retrieve the phone number for an incoming call.




回答2:


The Call Directory extension introduced in iOS 10 works like the Safari Content Blocker Extension that was introduced in iOS 9. Your extension has to supply a list of phone numbers (in safari's extension, it was a json file), these numbers will be stored by the iOS, and on the event of an incoming call, the system checks the list provided by your extension( same like safari would check the rules specified by the json file before loading a website ), provided, your extension is active at that time.

So, using this feature for creating a Caller ID like app is not possible, because things are not dynamic. Also there may be a limit on the number of phone numbers you can provide in the list, which hopefully be announced by the iOS 10 release.



来源:https://stackoverflow.com/questions/38098036/how-to-get-the-incoming-call-number-by-using-callkit

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