Hi,
I have implemented a check in my app to test if the user is currently connected to a network using the following function:
private func getWiFiSsid()->Bool {
if let interfaces = CNCopySupportedInterfaces() as NSArray? {
for interface in interfaces {
if let interfaceInfo = CNCopyCurrentNetworkInfo(interface as! CFString) as NSDictionary? {
m_ssid = interfaceInfo[kCNNetworkInfoKeySSID as String] as? String
return true;
}
}
}
return false
}
What I need is a function that can determine if Wi-Fi is enabled. regardless if the user is connected to a network or not.
Is this possible?
Thank you in advance