I want to make a call to a number which is in format:
*411*4567394415177895*10#
which is for recharging (topup) of balance in network.
I used following block of code for this:
NSURL *phoneUrl = [NSURL URLWithString:[NSString stringWithFormat:@"tel://%@",_textField.text]];
if ([[UIApplication sharedApplication] canOpenURL:phoneUrl]) {
[[UIApplication sharedApplication] openURL:phoneUrl];
NSLog(@"Can Call");
} else
{
NSLog(@"Can't Call");
}
It prints out the "can call" text which means that the url is correct and should direct me to the phone app in iOS but it stays in same screen.