WiFi Security type in iOS 11/12/13/14?

297 views Asked by At

In iOS 15 we have following method to check WiFi security type:

@available(iOS 15.0, *)
open var securityType: NEHotspotNetworkSecurityType { get }

Do we have anything in iOS 11 to 14 to know WiFi Security type?

1

There are 1 answers

0
YangDev On

In iOS 11 through iOS 14, there is no direct built-in method or property provided by Apple's Network Extension framework or CoreWLAN framework to determine the security type of a Wi-Fi network. These versions of iOS did not offer a native API to retrieve the specific security type (e.g., WPA, WPA2, WEP) of a Wi-Fi network.

To determine the security type of a Wi-Fi network in those iOS versions, you would typically need to analyze the network's SSID and possibly try to infer the security type based on naming conventions or other available information. However, this method is not guaranteed to be accurate because network names can vary widely and may not provide a clear indication of the security type.

Starting from iOS 15 and later, as you mentioned, the NEHotspotNetwork class includes the securityType property, which allows you to directly check the security type of a Wi-Fi network, making it more straightforward to determine the security type programmatically.