I’m trying to access the iOS device’s connected wifi name using the captive network part of the system configuration framework but I don’t seem to be able to find it (I’d added the reference but can’t see any of this). I thought this should do it:
var myArray: CFArrayRef := CNCopySupportedInterfaces();
var myDict: CFDictionaryRef := CNCopyCurrentNetworkInfo(CFArrayGetValueAtIndex(myArray, 0));
var networkName: NSString := CFDictionaryGetValue(myDict, kCNNetworkInfoKeySSID);
my apologies for this not getting attention. It seems there’s something wrong/odd with how the frameworks .h files ar esttructyured that cause this to not get imported properly. I raised priority and will see of we can get this addressed somehow, soon.
I’m trying one thing, now; if it works, good, if not I’ll need a fix from Carlo in the importer itself, Monday.
the problem is that frameworks are imported by importing their main .h file named after the framework itself, i.e. ./SystemConfiguration.framework/Headers/SystemConfiguration.h, but for tis framework, CaptiveNetwork.h is a separate header file that is not imported by there main one, so our importer doesn’t see it…
Afraid that didn’t work, no :(. We’ll have to wait to Monday, sorry.
Alternative, import the CaptiveNetwork.h header file yourself via an Import project; set no LinkLibrary for it, and make sure you do reference SystemConfiguration.fx in addition to your imported .fx.
Import project and sample app attached; you might need to tweak the search path in the import project if you wanna i’m port for Simulator (and.or Mac Catalyst) as well, as I don’t believe we support swiveling that automatically for this kind of hacked scenario…