iOS 拨号助手对 移动 172 号码段的判断错误BUG

iOS 拨号助手对 移动 172 号码段的判断错误,会将 判断为国际号码,导致无法拨打

直接在前面 加上 "+86-" 就可以解决,目前只知道 172 号码段有这个问题.

//场景实现:

NSURL *url = [NSURL URLWithString:@"tel:17233333333"];
[UIApplication sharedApplication] openURL:url];

处理方法:

NSMutableString * string = [[NSMutableString alloc] initWithFormat:@"tel:%@",@"17233333333"];
if ([string containsString:@"tel:172"]) {
    string = [string stringByReplacingOccurrencesOfString:@"tel:172" withString:@"tel:+86-172"];
}
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:string]];

类似问题文章:https://www.jianshu.com/p/35cbbe56ddc9
不过 这文章中说的BUG问题已经被苹果更新解决了.

你可能感兴趣的:(iOS 拨号助手对 移动 172 号码段的判断错误BUG)