0

I would like to start by saying the below threads do not offer a solution for me:

iOS - Detecting whether or not device support phone calls?

How to check if device can make a phone call (iOS 8)?

I want to be able to check if a user can place a phone call in my iPad app. Checking if an iPad can open the tel:// URL scheme is simply not enough with users having continuity on/off.

If continuity is off, and if the iPad is not a cellular iPad, I want a dialog box to display informing the user of this restriction.

In the settings application of an iPad, navigating to FaceTime there is an option "Calls from iPhone" that can be toggled on/off. Ultimately, this will only appear if a user is logged into the same iCloud account as the one on their iPhone.

Is there a way to check if these settings are enabled? Or is there another approach I am not aware of?

Community
  • 1
  • 1
romero-ios
  • 1,075
  • 1
  • 11
  • 20
  • Related thread [here](http://stackoverflow.com/questions/25873240/how-to-check-if-device-can-make-a-phone-call-ios-8#comment47461662_25873240). From the comment, I think an iPad will always open Facetime on a `tel://` link, just do nothing. – JAL Jan 18 '17 at 21:54
  • 1
    Whether the iPad has a cellular connection or not doesn't affect its ability to make a call. iPads can't make cellular calls directly. They can only make FaceTime calls or calls through a linked iphone – Paulw11 Jan 18 '17 at 23:03

1 Answers1

0

There are a couple of ways. You can try to use the NetworkStatus and ReachableViaWiFi + ReachableViaWWAN api as described in Apple documentaion and this SO post.

In sum you woul test how is the network reachable:

Reachability *reachability = [Reachability reachabilityForInternetConnection];
[reachability startNotifier];

NetworkStatus status = [reachability currentReachabilityStatus];

if(status == NotReachable) {
    // No data connection
} else if (status == ReachableViaWiFi) {
    // WiFi
} else if (status == ReachableViaWWAN) {
    // Cellular
}

Alternatively your can use the UIDevice class. Some useful code here and here. Basically you detect the device model and see if it is an iPad cellular or WiFi model.

Community
  • 1
  • 1
Alex
  • 995
  • 12
  • 25