7 Replies
      Latest reply on Sep 11, 2019 6:21 PM by andson
      andson Level 1 Level 1 (0 points)

        How to get the SSID of the surrounding Wi-Fi. If you apply for the NEHotspotHelper API permission, please advise?

        • Re: How to get the SSID of the surrounding Wi-Fi. If you apply for the NEHotspotHelper API permission, please advise?
          taavi013 Level 1 Level 1 (0 points)

          Probably something like:

          ...
          fileprivate extension ExampleHotspotHelper {
          
                  static let hotspotHandler: NEHotspotHelperHandler = { command in
          
                          switch command.commandType {
                          case .filterScanList:
                                  let networkList = command.networkList
                                  NSLog("FilterScanList:\n\(networkList.map { String(describing: $0) }.joined(separator: "\n"))")
                          
                          ....
                          }
                  }
          }
          ...
          

          NB! this is executed only when end user goes to Settings->Wifi and phone updates list of nearby networks.

          • Re: How to get the SSID of the surrounding Wi-Fi. If you apply for the NEHotspotHelper API permission, please advise?
            eskimo Apple Staff Apple Staff (11,835 points)

            How to get the SSID of the surrounding Wi-Fi.

            iOS has no general-purpose API to return Wi-Fi scan results.  There are both business and technical reasons why NEHotspotHelper will not work for that.  See this post for more.

            There may be a special purpose API that suits your needs, although to comment on that I’d need to know more about what you intend to do with this information.

            Share and Enjoy

            Quinn “The Eskimo!”
            Apple Developer Relations, Developer Technical Support, Core OS/Hardware
            let myEmail = "eskimo" + "1" + "@apple.com"

              • Re: How to get the SSID of the surrounding Wi-Fi. If you apply for the NEHotspotHelper API permission, please advise?
                andson Level 1 Level 1 (0 points)

                Hello,

                 

                Because our device is a Wi-Fi device, we need users to configure Wi-Fi linked to the Wi-Fi device in our application, because we don't know that the user wants to link to the Wi-Fi, so the user needs it. To select the Wi-Fi you want to link, we need to provide the user with a list of available Wi-Fi in the application. Let the user select Wi-Fi, enter the Wi-Fi password, and then pass the information through UDP. Sending to a Wi-Fi device to reach a network that modifies Wi-Fi device links, allowing the device to link to the internet, so that the user can remotely operate the Wi-Fi device. However, I applied for the NEHotspotHelper API not to pass. So I would like to consult under?

                 

                Thank you