3

Some time ago, I wrote a small app, which needs to create outbound phone calls on iOS. I used an URL to prepare the call like described here.

Since I never found an iOS method to perform the call - without a 'Would you like to call...' confirmation dialog - I finally dropped the project.

Recently I found 1-2-Contact, which does just this: If I press the phone icon, the phone call gets established without a confirmation dialog.

Does 1-2-Contact use a private frameworks? Or does a 'initiate phone call' method exist?

Community
  • 1
  • 1
SteAp
  • 11,853
  • 10
  • 53
  • 88

1 Answers1

4

Try the following:

NSString *phoneNumber = @"9123123"; //your number

NSString *telString = [NSString stringWithFormat:@"tel:%@"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:telString]];

Works for me.

Edit 1:

NSString *dtmfAfterPickup=@"0";

NSString *telString = [NSString stringWithFormat:@"tel:%@,%@", phoneNumber, dtmfAfterPickup];
Rui Peres
  • 25,741
  • 9
  • 87
  • 137