Is it possible to query WiFi state (enabled/disabled) on iOS programmatically? The query should return true when WiFi is enabled and device is not connected to any network.
EDIT: I am aware of the functionality provided by Reachability
class and as far as I understand it does not recognize enabled but not connected state of WIFI. I.e. the following code will return NetworkStatus
NotReachable
, which is not what I need.
Reachability* r = [Reachability reachabilityForLocalWiFi];
NetworkStatus ns = [r currentReachabilityStatus];