views:

111

answers:

2

Hi all,

what is the best way to find out whether the current device supports a phone call?

iPod Touch does not support it at all and iPhone does only support calls after entering the SIM password.

Is there a similar method like [MFMailComposeViewController canSendMail] for mail?

Thx in advance :)

A: 

I forget exactly how, but I believe there's a way to check if the device responds to the tel: URL handler.

Ben Alpert
Okay, Kevlar's answer is exactly what I was thinking of.
Ben Alpert
+9  A: 

I asked this same question, and the answer is this:

BOOL canCall = [[UIApplication sharedApplication]
                       canOpenURL:[NSURL URLWithString:@"tel:1234567"]];
Kevlar
Thanks for pointing out the dupe.
Stephen Canon
Sry I didnt see that question - thanks!!
Ghommey