After upgrading to iOS 10, I’m no longer taken to settings wifi page instead I got a message -canOpenURL: failed for URL: “prefs:root=WIFI” — error: “The operation couldn’t be completed. (OSStatus error -10814.)”
After reseaching, lucky, I got the solution. Using App-Prefs instead of prefs
if let url = URL(string:"App-Prefs:root=WIFI") {
if UIApplication.shared.canOpenURL(url) {
if #available(iOS 10.0, *) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
} else {
UIApplication.shared.openURL(url)
}
}
}
Other URLs:
- App-Prefs:root=WIFI
- App-Prefs:root=Bluetooth
- App-Prefs:root=MOBILE_DATA_SETTINGS_ID
- App-Prefs:root=INTERNET_TETHERING
- App-Prefs:root=Carrier
- App-Prefs:root=NOTIFICATIONS_ID
- App-Prefs:root=General
- App-Prefs:root=General&path=About
- App-Prefs:root=General&path=Keyboard
- App-Prefs:root=Wallpaper
- App-Prefs:root=SIRI
- App-Prefs:root=Privacy
- App-Prefs:root=SAFARI
- App-Prefs:root=MUSIC
- App-Prefs:root=MUSIC&path=com.apple.Music:EQ
- App-Prefs:root=Photos