How can I programmatically enable and disable WiFi connectivity with a jailbroken iOS device?
void SetWiFiMode(BOOL mode)
{
void* manager = WiFiManagerClientCreate(kCFAllocatorDefault, nil);
if (mode)
{
WiFiManagerClientSetProperty(manager, CFSTR("AllowEnable"), kCFBooleanTrue);
}
else
{
WiFiManagerClientSetProperty(manager, CFSTR("AllowEnable"), kCFBooleanFalse);
}
CFRelease(manager);
}
To use this your application entitlements should have com.apple.wifi.manager-access
key with boolean value set to true. All functions can be found in private MobileWiFi.framework