ios-Phone Intercept

Source: Internet
Author: User

IOS10 's phone interception concept is not the same as Android, based on the concept of privacy protection iOS does not send the other number to the app, so it needs to be used by the app to deposit calls that need to be identified or intercepted into the system database. This feature is implemented via the Call Directory Extension module (see 54944057, or Https://www.jianshu.com/p/e3d0acda8dda), By the blocking and indentification two related methods of the blacklist generation and identification number generation. These two methods are called by the system when the user opens the app's feature in the call-to-phone and identity-aware interface, which is set up. In the Addallblockingphonenumberstocontext function, some fixed number segments are shielded. This implementation of the shielding number, under the setting interface is not visible.

Issues to be aware of:

1, phone number to add country, area code, ascending order, Xcode default generated code has a problem, the correct number format should be as follows: +8618907311234, +8673122126000. See also: 78184598

2, the system phone book priority is higher than the identification number set by this method, that is, when there are settings, only display the name of the number book.

3, blacklist interception of incoming calls will not be displayed in the history of the call.

Here is my code to block multiple number segments:

1Cxcalldirectoryphonenumber allphonenumbers[] = {+8673122126000, +8673122129000, +8673182984000, +8673189520000, +8673189522000, +8673189526000, +8673189527000, +8673189587000 };2Nsuinteger count = (sizeof(allphonenumbers)/sizeof(Cxcalldirectoryphonenumber));3      for(Nsuinteger index =0; Index < count; Index + =1) {4Cxcalldirectoryphonenumber PhoneNumber =Allphonenumbers[index];5          for(intI=0;i< +; i + =1){6[Context addblockingentrywithnextsequentialphonenumber:phonenumber+i];7         }8}

In addition, there are several features that are not tried:

1, check the user authorization. See also: 52913028, 52768699?locationnum=1

2, add the blacklist number in real time, instead of having to trigger the blacklist setting in a single time in the setting.

3, real-time monitoring incoming calls. such as: https://www.2cto.com/kf/201607/525336.html, 46649115, https://mp.weixin.qq.com/s?__biz=mza3ntyzodyzmg==& mid=2653578016&idx=2&sn=ae1474cbc3037e5c00e6da5c69cd8569&chksm= 84b3b127b3c43831191d37ca0e86d2f2f7b97d180d8c0ccd6dedb9c4a9a9a8c0af909d28d558&scene=4#wechat_redirect

4, with the host application data sharing (extension and the main application is two applications, the main application of the data obtained if need to pass to extension, AppGroup). such as: 78184598, HTTPS://WWW.JIANSHU.COM/P/7F8472A97AA6

ios-Phone Intercept

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.