.
This is the code that use, always returns an empty list, no error appears, only empty list.
I am using iphone 12
'----------------------------------
[code]
Sub wifiscan_Scan()
Dim res() As String
Dim no As NativeObject = Me
Dim ssids As List = no.RunMethod("getSSIDs", Null)
Log(ssids)
TableView1.Clear
End Sub
#If OBJC
#import <SystemConfiguration/CaptiveNetwork.h>
- (NSMutableArray*)getSSIDs {
NSMutableArray* res = [NSMutableArray new];
NSArray *ifs = (__bridge_transfer id)CNCopySupportedInterfaces();
for (NSString *ifnam in ifs) {
NSDictionary *info = (__bridge_transfer id)CNCopyCurrentNetworkInfo((__bridge CFStringRef)ifnam);
if (info[@"SSID"]) {
B4IMap* map = [B4IMap new];
map.dict = info;
[res addObject:map];
}
}
return res;
}
#End If