aleksey.tomin
10/01/2020, 2:59 PMCFArrayRef interfaces = CNCopySupportedInterfaces();
CFDictionaryRef networkInfo = CNCopyCurrentNetworkInfo(CFArrayGetValueAtIndex(interfaces, 0));
NSString *ssid = CFDictionaryGetValue(networkInfo, @"SSID");
I’ve wrote:
val interfaces = CNCopySupportedInterfaces()
val interface: CFStringRef? = CFArrayGetValueAtIndex(interfaces, i)?.reinterpret()
val networkInfo = CNCopyCurrentNetworkInfo(interface)
val ssIdPtr = CFDictionaryGetValue(networkInfo, kCNNetworkInfoKeySSID)
val ssId = ?????
Nikolay Kasyanov
10/01/2020, 3:17 PMaleksey.tomin
10/01/2020, 4:47 PMval ssId = CFBridgingRelease(ssIdPtr) as String
Nikolay Kasyanov
10/02/2020, 8:36 AM