How to determine if an iPad can place a phone call iOS 10+

990 Views Asked by At

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?

1

There are 1 best solutions below

0
On

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.