Xcode 13 Unable to get wifi networks : "nehelper sent invalid result code [1] for Wi-Fi information request"

1.8k views Asked by At

I want to get all nearby networks(and/or the network the device is connected to). I am using Xcode 13 IOS14 and this code:

NEHotspotNetwork.fetchCurrent(completionHandler: { (network) in  
    if let unwrappedNetwork = network {  
        let networkSSID = unwrappedNetwork.ssid  
        print("Network: %{public}@ ", networkSSID )  
    } else {   
        print("No available network")               
    }           
})

info.plist:

enter image description here

Capabilities:

enter image description here

I tried this code and got this line: NEHotspotNetwork nehelper sent invalid result code [1] for Wi-Fi information request No available network

0

There are 0 answers