说明: 跳转到系统设置不同功能界面,只要知道路径都很简单,路径可以自己打开手机设置界面看,
照着模板把对应的名称替换就可以了,但是得知道对应功能的英文名称。
1、 prefs:root=Privacy&path=CAMERA 打开相机权限界面,
NSString *path = @"prefs:root=Privacy&path=CAMERA"; //路径
NSURL *url = [NSURL URLWithString:path];
if ([[UIApplication sharedApplication] canOpenURL:url])
{
[[UIApplication sharedApplication] openURL:url];
}
2、打开隐私-麦克风界面 prefs:root=Privacy&path=MICROPHONE
NSURL *url = [NSURL URLWithString:@"prefs:root=Privacy&path=MICROPHONE"];
if ([[UIApplication sharedApplication] canOpenURL:url])
{
[[UIApplication sharedApplication] openURL:url];
}
3、打开隐私-定位服务 prefs:root=Privacy&path=LOCATION
NSURL *url = [NSURL URLWithString:@"prefs:root=Privacy&path=LOCATION"];
if ([[UIApplication sharedApplication] canOpenURL:url])
{
[[UIApplication sharedApplication] openURL:url];
}
还可以直接打开某个应用的访问权限列表,路径 设置--应用名,类似高德地图关闭位置服务后,点击设置后跳转到高德的允许访问功能页面,
对于这种包含应用名的,我试了几种方法都没成功,不知道直接跳转到应用的路径怎么写。
网上一些打开其他界面的路径 以下不是绝对正确的,eg蓝牙,蓝牙是直接在根目录下 “prefs:root=Bluetooth”,手机版本不一样 路径可能也不一样
About — prefs:root=General&path=About
Accessibility — prefs:root=General&path=ACCESSIBILITY
Airplane Mode On — prefs:root=AIRPLANE_MODE
Auto-Lock — prefs:root=General&path=AUTOLOCK
Brightness — prefs:root=Brightness
Bluetooth — prefs:root=General&path=Bluetooth
Date & Time — prefs:root=General&path=DATE_AND_TIME
FaceTime — prefs:root=FACETIME
General — prefs:root=General
Keyboard — prefs:root=General&path=Keyboard
iCloud — prefs:root=CASTLE
iCloud Storage & Backup — prefs:root=CASTLE&path=STORAGE_AND_BACKUP
International — prefs:root=General&path=INTERNATIONAL
Location Services — prefs:root=LOCATION_SERVICES
Music — prefs:root=MUSIC
Music Equalizer — prefs:root=MUSIC&path=EQ
Music Volume Limit — prefs:root=MUSIC&path=VolumeLimit
Network — prefs:root=General&path=Network
Nike + iPod — prefs:root=NIKE_PLUS_IPOD
Notes — prefs:root=NOTES
Notification — prefs:root=NOTIFICATIONS_ID
Phone — prefs:root=Phone
Photos — prefs:root=Photos
Profile — prefs:root=General&path=ManagedConfigurationList
Reset — prefs:root=General&path=Reset
Safari — prefs:root=Safari
Siri — prefs:root=General&path=Assistant
Sounds — prefs:root=Sounds
Software Update — prefs:root=General&path=SOFTWARE_UPDATE_LINK
Store — prefs:root=STORE
Twitter — prefs:root=TWITTER
Usage — prefs:root=General&path=USAGE
VPN — prefs:root=General&path=Network/VPN