I am trying to find all the nearby hotspots using the following code:
for(NEHotspotNetwork *hotspotNetwork in [NEHotspotHelper supportedNetworkInterfaces]) {
NSString *ssid = hotspotNetwork.SSID;
NSLog(ssid);
NSString *bssid = hotspotNetwork.BSSID;
BOOL secure = hotspotNetwork.secure;
BOOL autoJoined = hotspotNetwork.autoJoined;
double signalStrength = hotspotNetwork.signalStrength;
}
I ran this code in the simulator after the user clicks a button. However, [NEHotspotHelper supportedNetworkInterfaces] returns nil. I don't understand why.