I have tried with the following code:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:phone]];
and also registered strings in LSApplicationQueriesSchemes
, but still not working phone call.
I have tried with the following code:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:phone]];
and also registered strings in LSApplicationQueriesSchemes
, but still not working phone call.
NSURL *pho_No = [NSURL URLWithString:[NSString stringWithFormat:@"tel:1231231234"]];
if ([[UIApplication sharedApplication] canOpenURL:pho_No])
{
[[UIApplication sharedApplication] openURL:pho_No];
}
else
{
// iPad or iPod Touch, can't make a call
}
Also check that, NSURL object must not be nil.