iOS APP内跳转到 设置
2023-11-20 本文已影响0人
Khazan
跳转到 设置 - APP
if let settingsUrl = URL(string: UIApplication.openSettingsURLString) {
UIApplication.shared.open(settingsUrl)
}
其它方式
- 使用 "prefs:root="
iOS11后被禁用
https://developer.apple.com/forums/thread/115981?answerId=358016022#358016022
- 使用 "App-Prefs:root"
if let settingsUrl = URL(string: "App-Prefs:root") {
UIApplication.shared.open(settingsUrl)
}
Apple将其视为私有API,Apple审核会拒绝
https://developer.apple.com/forums/thread/691712?answerId=690943022#690943022