当拨打呼叫时,我面临一个问题,因为在拨打免费本地号码时,它会自动分配国际或本地前缀,从1开始到ISD。
NSString *phNo = @"18605003000";
NSURL *phoneUrl = [NSURL URLWithString:[NSString stringWithFormat:@"tel:%@",phNo]];
NSLog(@"in call");
if ([[UIApplication sharedApplication] canOpenURL:phoneUrl]) {
[[UIApplication sharedApplication] openURL:phoneUrl];
}对于上面的代码,当Dail是ON时,它是前缀号,并使用+1 (860) 500-3000进行转换,这实际上是一种印度免费重定向到ISD来呼叫..To避免这一点我想检查Dail是ON还是用编程方式禁用这个。
我甚至提到过这个iOS dial assist auto formats local number to USA number,但是这样做是错误的。
有谁能给我建议一下可能的方法吗?

发布于 2016-08-04 06:07:07
我试了一下代码,并有拨号帮助,但它拨打了"18005003000“,没有转换成+1 (800) 500-3000。
NSURL *url = [NSURL URLWithString:@"tel://18005003000"];
[[UIApplication sharedApplication] openURL:url];https://stackoverflow.com/questions/38759372
复制相似问题