How to get the caller's phone number?

Hello, I am trying to develop an app , using Flutter. My app has its own database which it contains the customer info such as name, address and phone number. I need to get the caller's phone number then I use the phone number and search in my database and if the phone# exist in our DB , I extract customer info and show it on pop up screen. How can I get the phone number of the person who is calling? i tried this, it didnt work:

let networkInfo = CTTelephonyNetworkInfo() guard let carrier = networkInfo.serviceSubscriberCellularProviders?.first?.value else { return nil } return carrier.mobileNetworkCode

Is there any way to get caller's number while he/she is calling?

Thanks P.

How can I get the phone number of the person who is calling?

You can’t.

If you’re goal is to identify and potentially block incoming calls, take a look at the Call Directory app extension feature in CallKit.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks for you response. As I mentioned in above, I want to get the caller phone number and search in my own database. So there is not way to do that????

How to get the caller's phone number?
 
 
Q