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:
Capabilities:
I tried this code and got this line:
NEHotspotNetwork nehelper sent invalid result code [1] for Wi-Fi information request No available network