I'm using the code snippet below, but it does not seem to open the Settings, it opens the Notifications settings of the app.
I need to open the wifi settings to enable the user to switch it off, iOS 12, Swift 4.2
{
if response.actionIdentifier == "action1" {
guard let settingsUrl = URL(string: UIApplication.openSettingsURLString) else {
return
}
if UIApplication.shared.canOpenURL(settingsUrl) {
UIApplication.shared.open(settingsUrl, completionHandler: { (success) in
print("Settings opened: \(success)") // Prints true
})
}
}
}