Swift5: 跳转Settings设置中指定页面的方法和URL
2022-03-21 本文已影响0人
CoreF
Swift跳转app外其他页面方法:
func openXXXX() {
guard let url = URL(string: "xxxxxxx") else {
return
}
if UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
}
各页面的URL地址
打开Settings设置中本应用设置:
UIApplication.openSettingsURLString
其他页面URL地址可使用格式:
例如:App-prefs:TITLE1&path=Title2/XXX
打开Settings设置页面:
App-prefs:
邮件:
App-prefs:MAIL
App-prefs:MAIL&path=ACCOUNTS
App-prefs:MAIL&path=ACCOUNTS/ADD_ACCOUNT
WIFI:
App-prefs:WIFI
蓝牙:
App-prefs:Bluetooth
通知:
App-prefs:Notification
一般:
App-prefs:General
App-prefs:General&path=About
App-prefs:General&path=CARPLAY
App-prefs:General&path=keyboard
App-prefs:General&path=VPN
App-prefs:General&DATE_AND_TIME
App-prefs:General&path=INTERNATIONAL // Language & Region
App-prefs:General&path=ManagedConfigurationList // Profile(描述文件)
App-prefs:Reset
壁纸:
App-prefs:Wallpaper
辅助功能
App-prefs:ACCESSIBILITY
iCloud:
App-prefs:CASTLE
App-prefs:CASTLE&path=STORAGE_AND_BACKUP
FaceTime:
App-prefs:FACETIME
Phone:
App-prefs:Phone
Photos:
App-prefs:Photos
App Store:
App-prefs:APPSTORE
App-prefs:STORE
Safari浏览器:
App-prefs:SAFARI
Sounds声音:
App-prefs:Sounds
Siri:
App-prefs:Siri