1.
NSString *str = @"tel:18337371430";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str] options:@{} completionHandler:nil];
2.
dispatch_after(0.2, dispatch_get_main_queue(), ^{
NSMutableString *str=[[NSMutableString alloc] initWithFormat:@"tel:%@",@"18337371430"];
UIWebView *callWebview = [[UIWebView alloc] init];
[callWebview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:str]]];
[self.view addSubview:callWebview];
});
3.
NSMutableString* str=[[NSMutableString alloc] initWithFormat:@"telprompt://%@",@"18611116979"];
dispatch_after(0.2, dispatch_get_main_queue(), ^{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str] options:@{} completionHandler:nil];
});
加入延迟线程就不会打印错误:
[Common] _BSMachError: port 7a03; (os/kern) invalid capability (0x14) "Unable to insert COPY_SEND"
网友评论