之前用下面的代码来做一个联系客服的QQ跳转方式
UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectZero];
NSString *qq=[NSString stringWithFormat:@"mqq://im/chat?chat_type=wpa&uin=%@&version=1&src_type=web",SM910QQSERVICE];
NSURL *url = [NSURL URLWithString:qq];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
// webView.delegate = self;
[webView loadRequest:request];
[self addSubview:webView];
但是升级了iOS10以后,测试同事说没法跳转到QQ了,然后改了一下,就可以跳转了
NSString *qq=[NSString stringWithFormat:@"mqq://im/chat?chat_type=wpa&uin=%@&version=1&src_type=web",SM910QQSERVICE];
NSURL *url = [NSURL URLWithString:qq];
[[UIApplication sharedApplication] openURL:url];