0

I want to check if iOS device I am using has support for Facetime call. I don't want to check the iOS version on the device, rather if the device has the hardware support to initiate a Facetime call.

For example: I have an iPad 1 with iOS version 4.0 and above, but if I don't have a camera (or a front camera), the Facetime call should not initiate. How can I do this?

halfer
  • 19,824
  • 17
  • 99
  • 186
Jayshree
  • 281
  • 1
  • 6
  • 28

2 Answers2

3

Try using canOpenUrl method with FaceTime scheme, as follows:

[[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString: @"facetime://5555555555"]];
Andrey Zverev
  • 4,409
  • 1
  • 28
  • 34
1

you could check if the device responds to hasTorch

AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo]; 
if ([device hasTorch]) { 
//do stuff
}

this way you know they can handle facetime, so maybe show an alert asking them to ensure facetime is enable before initiating a call?

Nik Burns
  • 3,363
  • 2
  • 29
  • 37