-1

Can I display the list of wifi access points on UI dialog & allow user to switch wifi settings from within my app by using swift 3?

OR

Is it possible to open the wifi settings on a prompt dialog which does not cover full screen?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
rijoh
  • 49
  • 1
  • 5

1 Answers1

0

No. Check this answer. It may help you

Objective C

if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"prefs:root=WIFI"]]) {
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=WIFI"]];
} else {
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"App-Prefs:root=WIFI"]];
}

Swift

if UIApplication.shared.canOpenURL(URL(string: "prefs:root=WIFI")) {
    UIApplication.shared.openURL(URL(string: "prefs:root=WIFI"))
}
else {
    UIApplication.shared.openURL(URL(string: "App-Prefs:root=WIFI"))
}
Mathi Arasan
  • 869
  • 2
  • 10
  • 32