Choose WiFi network in my app?

Hi,


Is there a way my app can cause iOS to connect to a Wifi network?


The reason I want to do this is because the app is designed to interface with a hardware device that uses its own local Wifi hotspot for communication. Presently, my app only works if the user manually connects to the device's Wifi network using the Settings app. We'd like to have the app automatically connect when it recognizes the SSID of the device. I know how to ask for the list of SSIDs, but don't know how to tell iOS to connect to one of them.


Thanks,

Frank

Replies

For starters, see this thread: https://forums.developer.apple.com/thread/67613

NEHotspotHelper.


Then: https://forums.developer.apple.com/thread/91487

I know how to ask for the list of SSIDs …

You do? How are you doing that?

Regardless, the best place to start here is QA1942 iOS Wi-Fi Management APIs, which summarises the options you have available.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

I'm using CNCopySupportedInterfaces and CNCopyCurrentNetworkInfo to get the SSID list. Thanks for the info about Hotspot Manager.


Frank

I'm using CNCopySupportedInterfaces and CNCopyCurrentNetworkInfo to get the SSID list.

I’m confused by this. These APIs report that SSID of the network to which your device is currently associated. That’s not a list, that’s a single item.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Yeah, you're probably right about that, sorry for the confusion. I work on a lot of different apps, and I was thinking of one where I used those functions, but I may only have needed to get the name of the connected Wifi address in that app.


Frank

Yeah, you're probably right about that, sorry for the confusion.

No worries.

Coming back to your original, the answers you seek are in QA1942. Read it through and then let us know if anything is still unclear.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"