iOS- call a phone number without sharing their number

267 Views Asked by At

My app allows users to call another with click of a button. But user's don't want to share their number. That is when user tries to call another one , app will hide their mobile number and display only their name saved in DB or any random digits. Is it possible in iOS?

I know how to do mobile calling in iOS.

NSString *phNo = @"+912436580";
NSURL *phoneUrl = [NSURL URLWithString:
          [NSString  stringWithFormat:@"telprompt:%@",phNo]];

if ([[UIApplication sharedApplication] canOpenURL:phoneUrl]) {
    [[UIApplication sharedApplication] openURL:phoneUrl];
} else
{
   UIAlertView *calert = [[UIAlertView alloc]
                            initWithTitle:@"Alert" 
                            message:@"Call facility is not available!!!" 
                            delegate:nil 
                            cancelButtonTitle:@"ok" 
                            otherButtonTitles:nil, nil];
    [calert show];
}

Is it possible to hide the calling number? Please help me.

2

There are 2 best solutions below

2
On

It is impossible:

1) You must be able to know what number you are calling, it is very important so that you avoid fees for surtaxed numbers, and apple won't let you do otherwise.

2) Even if you manage to hide the phone number, it would still appear on the bill from the user mobile operator.

Only workaround would be to call through a secure connexion to a SIP server (Without using voice call feature of the phone), but then it wouldn't transit through the phone app, and the usual voice plan of the user.

0
On

I think it is not possible.

The Call application only allow you to pass numbers to call and you do not have control on what to show as Title (Name OR Number) while calling using Call app of device.

But if you are calling to a Number which is in your device Contact then it will show Name of the person matching Number.

But it is not possible to show your desired Name while calling from your application.