Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Objc_util is confusing me.
-
So I am trying to convert the following to python (can’t code block it on mobile...)
@import SystemConfiguration.CaptiveNetwork; /** Returns first non-empty SSID network info dictionary. * @see CNCopyCurrentNetworkInfo */ - (NSDictionary *)fetchSSIDInfo { NSArray *interfaceNames = CFBridgingRelease(CNCopySupportedInterfaces()); NSLog(@"%s: Supported interfaces: %@", __func__, interfaceNames); NSDictionary *SSIDInfo; for (NSString *interfaceName in interfaceNames) { SSIDInfo = CFBridgingRelease( CNCopyCurrentNetworkInfo((__bridge CFStringRef)interfaceName)); NSLog(@"%s: %@ => %@", __func__, interfaceName, SSIDInfo); BOOL isNotEmpty = (SSIDInfo.count > 0); if (isNotEmpty) { break; } } return SSIDInfo; }
But even when I load the SystemConfiguration framework I can't make an instance of CaptiveNetwork. Or am I totally doing this wrong.
-
-
Hm... strangely that only shows the wifi I am connected to. The snippet (from SO) is supposedly supposed to show all networks.
-
@chibill This comment under the StackOverflow answer (that I assume you have this from) suggests that the original code does the same.
-
I don’t think getting a list of all networks is actually possible without jailbreak.
It would be possible with the (private) MobileWiFi framework, but in order to use it, an app needs special entitlements that 3rd-party apps can’t get.
-
That’s annoying... (Why do people not say the full truth in SO answers like seriously)
-
The only way I know is the Apple IOS app Airport
-
Why does Apple make it so hard to do the simplest of things. (Like on Windows and Android they have API’s for this.)
Like how is know what WIFI is around you going to hurt them or the End user.
-
This post is deleted!