NSURL *url = [NSURL URLWithString:@"itms-beta://"];
// 检测是否安装Testflight
BOOL type = [[UIApplication sharedApplication] canOpenURL:url];
if (type == YES)
{
//已经安装 打开测试连接
url = [NSURL URLWithString:@"https://testflight.apple.com/join/xxxxxxx"];
[[UIApplication sharedApplication] openURL:url options:nil completionHandler:^(BOOL success) {
}];
}