Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Callkit block all calls except whitelisted contacts?

Is it possible to create a whitelist call blocking app in iOS 11?

For example, I want to block all numbers except those in my contacts list.

It looks like the api only allows you to create a list of numbers to block, not a list of numbers to allow.

https://developer.apple.com/documentation/callkit

like image 271
Hackmodford Avatar asked Nov 08 '17 15:11

Hackmodford


People also ask

Is there an app that blocks all calls except contacts?

Hiya app. The Hiya app blocks calls and provides you with more information about numbers from outside of your contact list. Hiya can flag unknown numbers as spam, a possible colleague, or someone as important as the doctor's office.

Can I block calls from numbers not in contact list?

Some Android phones have a feature called Call Screen, which enables Google Assistant to screen calls from anyone not in your contacts. Go to Settings > Spam > Call Screen. Select Call Screen and under Unknown Call Settings, select which types of callers you'd like to screen (spam, possible fake numbers, and so on).

What is CallKit functionality?

Tag: CallKit The Amazon Chime SDKs for iOS and Android allow application developers to integrate real time audio, video and screen share functionality into their iOS and Android applications.


2 Answers

Yes, you can only block specific list, you don't have permission to invert the case. This is against Apple's policy. Not sure if possible by using private apis, otherwise by public/legal way, you cant do that.

This is text from apple's documentation:

When a phone receives an incoming call, the system first consults the user’s block list to determine whether a call should be blocked. If the phone number is not on a user- or system-defined block list, the system then consults your app’s Call Directory extension to find a matching blocked number.

Above text clearly says that, when call received, it only consult your list to check for block list, invert case is not available.

Even you can remove blocked contacts added by other apps, you have only access to blocked numbers added by your app's call directory extension.

So, If you are thinking of blocking all numbers except some list, then this is not possible in iOS.

like image 62
Mehul Thakkar Avatar answered Nov 08 '22 12:11

Mehul Thakkar


You cannot achieve this with CallKit, however there is one (much more complicated) way to dismiss incoming calls and do exactly what you want with an external Bluetooth device - like this kind of prototyping board (product is no more sold but you will find some other nice boards around the web).

The trick is to pair your App with a Bluetooth device that implements the Apple ANCS profile. This profile will make your device able to answer to incoming notifications and calls... See it coming? You can imagine this like a minimalistic iWatch from where you could answer or reject calls and any notification. If your App is connected and can communicate with the device, then it will be able to send a command asking to dismiss a call for you.

Thus, at the end it would works as is:

  1. you connect to your paired Bluetooth device,
  2. when you receive a call it sends you the caller identifier,
  3. you compare this identifier to your whitelist,
  4. if not present, you ask your device to answer "no" to the call notification,
  5. the call is rejected.

Of course that is very far from what you expected when asking this question, but it's worth mentioning it as this is the only doable (and tested!) solution today.

like image 40
JBA Avatar answered Nov 08 '22 10:11

JBA