How to Check If Device Can Make a Phone Call (iOS 8)

Detecting whether or not device support phone calls?

The iPhone supports the tel:// URI scheme. So you could use:

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

canOpenURL: explicitly checks whether there's an application capable of opening that URL scheme, not that the URL is correct. So it doesn't matter that no phone number is specified. The method returns a BOOL, so check that for YES or NO.

That should literally answer whether there's any application present capable of making a telephone call. So it should be okay against any future changes in device segmentation.

How to tell if Cocoa Touch device can make calls?

You could query [[UIDevice currentDevice] model], and check if it is an iPhone.

How do I test if IOS device has telephone capabilities?

Check if application can open tel url:

if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"tel:+11111"]])
// device has phone capabilities

iOS How to check if currently on phone call

The CTCallCenter object has a currentCalls property which is an NSSet of the current calls. If there is a call then the currentCalls property should be != nil.

If you want to know if any of the calls is actually connected, then you'll have to iterate through the current calls and check the callState to determine if it is CTCallStateConnected or not.



Related Topics



Leave a reply



Submit