The following code works fine on iOS 9, see this post. But it doesn't work on iOS 10. How to open WIFI settings programmatically on iOS 10
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=WIFI"]];
This works fine on iOS 10,
Go to Targets --> (Application) --> Info --> URL Types --> +
In the URL Schemes
write
prefs
Then add the following code,
-(void)openWifiSettings{
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"]];
}
}