Hello,
My app just need to get the name of the Wi-Fi network to which the device is currently associated.
In the following QA1942 they talk about CNCopyCurrentNetworkInfo which is now deprecated.
So what can I use with iOS 14 to just get the name of the Wi-Fi network to which the device is currently associated ?
Regards,
Fred.
My app just need to get the name of the Wi-Fi network to which the device is currently associated.
In the following QA1942 they talk about CNCopyCurrentNetworkInfo which is now deprecated.
So what can I use with iOS 14 to just get the name of the Wi-Fi network to which the device is currently associated ?
Regards,
Fred.
Starting with iOS 14, the SSID and BSSID of the currently connected Wi-Fi network can be obtained using the fetchCurrent(completionHandler:) method of the NEHotspotNetwork class. Note that the use of fetchCurrent(completionHandler:) does not require the NEHotspotHelper entitlement.
This method returns SSID and BSSID of the current Wi-Fi network when the requesting application meets one of following 4 requirements:
An application will receive nil if does not have the "com.apple.developer.networking.wifi-info" capability.
This method returns SSID and BSSID of the current Wi-Fi network when the requesting application meets one of following 4 requirements:
application is using CoreLocation API and has user's authorization to access precise location.
application has used NEHotspotConfiguration API to configure the current Wi-Fi network.
application has active VPN configurations installed.
application has active NEDNSSettingsManager configuration installed.
An application will receive nil if does not have the "com.apple.developer.networking.wifi-info" capability.