5

That's the question, but here's the long version: I'm working on a project that needs to mimic the connection workflow of the Belkin Wemo. The Wemo is a physical switch that can be controlled from an iOS app.

Belkin Wemo and app

This is how the setup works:

  1. The Wemo acts as a wifi router, it broadcasts an SSID, and you choose it from the list of available networks in your iPhone settings.
  2. You then choose your home wi-fi network from within the wemo app, given a list of available networks. and enter your network password. Presumably so the Wemo device can connect to your wi-fi router.
  3. The Wemo app then announces it is connecting, and then that it is setting up remote access.

Which brings me to: How does the Wemo app check for available networks -- aka, Is there an iOS API for scanning available networks, displaying them and working with them?

inorganik
  • 24,255
  • 17
  • 90
  • 114
  • Possible duplicate of [iPhone get a list of all SSIDs without private library](https://stackoverflow.com/questions/9684341/iphone-get-a-list-of-all-ssids-without-private-library) – Senseful Sep 24 '18 at 05:23

2 Answers2

1

There is no public API in iOS currently that can do this (used to be available pre iOS 5). You can check out a third party library like Stumbler which should help you achieve the viewing of networks: http://code.google.com/p/iphone-wireless/wiki/Stumbler

savner
  • 830
  • 6
  • 7
  • 2
    Without jailbreaking you won't be able to make the connection in app. If you jailbreak you can make use of Apple80211.framework (which Stumbler uses) to make the connection. Also to note, using Stumbler will prevent app store approval. – savner Jun 04 '13 at 20:59
  • The Wemo app can do it though. So there must be a way. – inorganik Jun 04 '13 at 21:01
  • 5
    The Wemo hardware is doing the work routing to the correct network and reading available networks. The iPhone just displays a menu with data provided directly from Wemo and can send back response that Wemo acts on to select the network it will route to. – savner Jun 04 '13 at 21:03
0

As question is very old and Apple has come with new advances in iOS.

It is now possible to scan the wi-fi using NEHotspotHelper (Apple Doc). But you still need permission from Apple to use this extension as NEHotspotHelper is special API with some guidelines (link).

Apple TQ & A

manismku
  • 2,160
  • 14
  • 24
  • NEHotspotNetwork will only return a list of networks when the user navigates to the Wi-Fi page in Settings. See [this answer](https://stackoverflow.com/a/52472782/35690) for more details. – Senseful Sep 24 '18 at 05:01