Turn on WiFi Programatically and latch to a known SSID

Are there programatic ways to turn on WiFi and latch the phone to a known SSID ?

Without Jailbreaking


I want my users to latch to a particular wifi network(if available) whenever they open my app.


Some stackoverflow posts say that it is not possible and that Apple may open up to developers in future (Though this was posted in 2012).

Does Apple have any such plans to open that up ?


does the below link speak of registering SSID - does it mean it allows me to connect to wifi programatically ?

https://developer.apple.com/library/ios/documentation/SystemConfiguration/Reference/CaptiveNetworkRef/index.html

Replies

If your application absolutely needs WiFi, there's a build flag that you can set which will ensure that wifi is running for your application.

And the CaptiveNetworking functions are provided so that Developers can do things like custom authentication with various wifi networks. Generally, CaptiveNetwork comes into play after the user has chosen that network, it's not really a way to force the user onto that network.


Otherwise, no, your "Turn on WiFi and latch the phone to a known SSID" is a device management function. You can't do that from a Developer written application directly. The best you can do is do that indirectly, through the use of device management profiles, or MDM software.


But all that requires the owner of the device to give up control of the device. In other words, "Your users" only happens if you happen to be the administrator for the device, not if you're just someone that wrote an application that the user happened to install on the device.

Above and beyond what you've already stated, Captive networks frameworks are no longer available. They

have been deprecated and unlike previous deprecations, cease to function entirely as of iOS 9.

What library can be used instead of CaptiveNetworks to connect to a WIFI network through the app?

Apparently Apple relented about removing CaptiveNetwork; it was reinstated in the iOS 9 GM. However, it is still deprecated. See this thread for all the complaints people have had and for the resolution of the issue: https://forums.developer.apple.com/thread/11807#50282