Apple changed some things regarding WiFi with iOS 13. If you want to use CNCopyCurrentNetworkInfo your app needs to have one of the following
I've spent hours trying to figure out a way to let CNCopyCurrentNetworkInfo works on iOS 13 with no results, no matter location permissions status or the fact that my app configured the current Wi-Fi network the device is currently using via NEHotspotConfiguration. It just does not work.
I finally came out with the reliable solution to get the SSID through getConfiguredSSIDsWithCompletionHandler: method of NEHotspotConfigurationManager.
Here's a simple example:
static func retrieveCurrentSSID( callback: @escaping ( String? ) -> Void ){
NEHotspotConfigurationManager.shared.getConfiguredSSIDs { ( networkSSIDs ) in
callback( networkSSIDs.first )
}
}