iOS does not have a general-purpose Wi-Fi scanning API, nor does it have an API for you to manipulate the user’s Wi-Fi configuration. There are some special-purpose APIs and techniques that can help in some specific circumstances, but it does not sound like they apply here. I’m going to attempt to clarify that below but, before I do that, I want to define my terminology:
I’m going to use terms from my Wi-Fi Fundamentals.
I’m going to call your “hardware device” an accessory, to distinguish it from the iOS device itself.
So, it’s sounds like your accessory has the following characteristics:
it creates its own Wi-Fi network (it’s an AP that publishes an SSID)
that network does not provide access to the wider Internet
you want you app to:
scan for nearby SSIDs
join the chosen SSID
talk to your accessory
restore the iOS device’s original SSID
Is that correct? If so, iOS does not have any APIs that can help you here. Rather, you’ll have to use a very manual process:
the user manually joins the accessory’s network in Settings
they then switch to your app
your app talks to the accessory
the user then switches back to Settings to rejoin their original network
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"
Hi. I need only the first point: scan for nearby SSIDs. Is it possible? If not, why not? I think there are not danger in this action.
Thank you for your answer.
It isn't possible to scan for SSID's. Most likely the reason is for privacy and battery life, so apps can't use SSID scanning to determine the user's location while impacting battery life.