原因:
//跳转到定位开关界面
NSURL *url = [NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"];
if( [[UIApplication sharedApplication]canOpenURL:url] ) {
[[UIApplication sharedApplication] openURL:url];
}
使用prefs:root做强制跳转设置界面了
解决:
将prefs:root和App-Prefs:root都注释到即可
替换成
//跳转到定位权限页面
NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
if( [[UIApplication sharedApplication]canOpenURL:url] ) {
[[UIApplication sharedApplication] openURL:url];
}
网友评论