Is there a way to block No Caller ID with Call Directory Extension in iOS?
Clash Royale CLAN TAG#URR8PPP
Is there a way to block No Caller ID with Call Directory Extension in iOS?
I am working on a custom Phone dialer app for iOS. My idea is to create a good experience by being able to block No Caller ID phone call with Call Directory Extension. Currently on iOS there is no way to block unknown caller, except by turning on Do Not Desturb mode.
Is there a way to somehow programmatically identify and block caller that has no phone number identification or by blocking a label that says No Caller ID?
So far I have tried this in CallDirectoryHandler
CallDirectoryHandler
private func addAllBlockingPhoneNumbers(to context: CXCallDirectoryExtensionContext)
/**
Retrieve all phone numbers to block from data store. For optimal performance and memory usage
when there are many phone numbers, consider only loading a subset of numbers at a given time
and using autorelease pool(s) to release objects allocated during each batch of numbers
which are loaded.
Numbers must be provided in numerically ascending order.
*/
let unknownCaller = CXCallDirectoryPhoneNumber()
let unknownCaller1: CXCallDirectoryPhoneNumber = 0
let unknownCaller2: CXCallDirectoryPhoneNumber = 00000000
let caller381X: CXCallDirectoryPhoneNumber = 38161XXXXXXX
context.addBlockingEntry(withNextSequentialPhoneNumber: unknownCaller)
context.addBlockingEntry(withNextSequentialPhoneNumber: unknownCaller1)
context.addBlockingEntry(withNextSequentialPhoneNumber: unknownCaller2)
context.addBlockingEntry(withNextSequentialPhoneNumber: caller38161X)
And so far I have been able to block this regular phone number 38161XXXXXXX but, if that same number calls by hiding with prefix #31#, the call will go through.
Does anyone know if this is possible and is there a way to identify and block No Caller ID?
1 Answer
1
No, a CallKit call blocking extension must specify the number(s) to be blocked. You cannot specify "no number" to be blocked.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
I see... Thanks for the response, even my carrier cannot block this incoming 'No Caller ID' phone call :S I thought I would've made something, but...
– Miki
Aug 8 at 7:45