I'm trying to access the WIFI settings through my application using Objective-C. But can not find any way. Could someone help me?
Already tested with:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=WIFI"]];
Does not work on iOS 9.
This is my code
Try to add prefs to URL schemes like https://stackoverflow.com/a/31253743/3668465 did
As per Apple's New Review standards, we are not supposed to use this way to open Wi-Fi Settings. I have been using this for long time in my app and recently Apple rejected with the below comment.
So you can just navigate to settings of the app by using UIApplicationOpenSettingsURLString.
Swift Code:
All conditions:
You can't get straight to wifi setting with openURL. All you can do is to open settings for your own app.
You can use this option:
iOS >= 4.1 it's possible to obtain SSID of wireless network that device is currenctly connected to.
For this you'd use function CNCopyCurrentNetworkInfo
Details on implemenation: iPhone get SSID without private library