3

How do I programmatically make phone calls on the iPhone?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Sneha Ambure
  • 75
  • 3
  • 7
  • You can't make a phone call without letting the user know (and it's a good thing), if that's what you meant. If not, refer to the answers below. – zneak Jul 30 '10 at 05:11

3 Answers3

9

Try this:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://8005551212"]];

... which will bring up a dialog in which your users will confirm the call.

esqew
  • 42,425
  • 27
  • 92
  • 132
3

I know this is an old post, but I'll give a different answer.

esqew approach works well but it goes straight to the phone app and it doesn't give you a prompt to confirm the number with a call button.

Try this approach and it gives a prompt option.

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"telprompt://1028464023"]];

The only thing that changes is: telprompt on URLWithString. Give it a try.

Michael Ortiz
  • 757
  • 1
  • 8
  • 21
0

Since you don't want to do it the way seanny94 suggests, the only other way is VoIP. Check this question or ask Skype how to do it.

Community
  • 1
  • 1
Swapnil Luktuke
  • 10,385
  • 2
  • 35
  • 58