I'm trying to fetch current connected network (WiFi or hotspot or MobileNetwork). I'm using the below code snippet
NEHotspotNetwork.fetchCurrent { hotspotNetwork in
print("Network Information")
print(hotspotNetwork?.ssid)
print(hotspotNetwork?.isSecure ?? true)
print(hotspotNetwork?.bssid)
print(hotspotNetwork?.securityType)
print(hotspotNetwork?.signalStrength)
I'm able to get the wi fi details. but one thing I noticed that it is giving every network as a UnSecure network whether it is password protected or not.How can we differentiate secure network and Unsecure network.
And after some time, all of sudden, it stop giving all the values i.e. for each(ssid, isSecure, bssid, securityType, signalStrength) It gives nil values. Can anyone help me upstanding this. Thanks in advance.