ios10以后之前的跳转好像不能用了,好像只能跳转到本应用的设置中,所以只好加了版本的判断
#define IOS10_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 10.0)
NSURL *url;
if (IOS10_OR_LATER) {
url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
}else{
url = [NSURL URLWithString:@"prefs:root=Bluetooth"];
}
// 判断是否能打开URL
if ([[UIApplication sharedApplication] canOpenURL:url]) {
[[UIApplication sharedApplication] openURL:url];
}
其他跳转的URL可参考文章:http://www.jianshu.com/p/98d28bad06c5