wifi detection

I was working to create a utility that could detect the signal strength of available wifi. I am aware that this is almost impossible with Ios, but I guess if there is a way to do it or an idea that could allow me to accomplish this result. What I mean is any way to detect a list of available wi-fi using an ios app? This would be a main function.

Replies

Check out the CWWiFiClient framework, which I think is in CoreWiFi


Here's some code I was playing with recently. This was on MacOS. I'm not certain whether these APIs are supported on iOS. This is showing the signal strength of the Wifi that I'm associated to, not all WiFi available.


//I'm not sure all these imports are necessary for this code sample:
import SystemConfiguration
import CoreWLAN
import SystemConfiguration.CaptiveNetwork

...

        if let interfaceNames = CWWiFiClient.interfaceNames() {
            for interface in interfaceNames {
                debugPrint("CWWiFi interface name \(interface)")
            }
        }
        let cwwifi = CWWiFiClient.shared()
        if let interface = cwwifi.interface() {
            if let name = interface.interfaceName {
                debugPrint("wifi interface name \(name)")
            }
            if let bssid = interface.bssid() {
                debugPrint("wifi bssid \(bssid)")
            }
            if let hardwareAddress = interface.hardwareAddress() {
                debugPrint("wifi hw address \(hardwareAddress)")
            }
            debugPrint("rssi \(interface.rssiValue())")
            debugPrint("noise \(interface.noiseMeasurement())")
        }

Sample output:


"CWWiFi interface name en1"

"wifi interface name en1"

"wifi hw address c8:e0:eb:32:15:8b"

"rssi -29"

"noise -95"


You can always option-click the wifi symbol in the top right of the mac to get diagnostic information, including the rssi and noise, for confirmation.

With regards droot, I hate to be the bearer of bads news but CoreWLAN is not available on iOS.

As to your options on iOS, those are rather limited. iOS has no general-purpose API to get Wi-Fi scan results. If you explain more about the context of your request — why do you need Wi-Fi scan results and what are you going to do with them when you get them — I should be able to offer further guidance.

Share and Enjoy

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

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

thanks. I need to get all values of wi-fi and mobile tower powers, to calcolate an index . So I should get all wifi detected by the phone and all mobile operators and check the power .....


If I can calculate only the wi fi I am connected with and the same forthe mobile operator, I should work only on statistics sistuation to calculate my index... but as you can understand, may be in New York in a street I can get 40 wifi... and in the countriside just 1-2...


Are you aware of any other app using these information or any third part providing some Api regarding these info?

I need to get all values of wi-fi and mobile tower powers

OK. I’m sorry to be the bearer of bad news here, but there’s definitely no supported way to do that.

Share and Enjoy

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

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