How can I enable and disable WiFi connectivity with a jailbroken iOS device?

三世轮回 提交于 2019-11-29 08:53:53
creker
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

There isn't a way using the APIs provided by the SDK. It's trivial to do if you use private frameworks, but if you use private frameworks, you will be in violation of Apple's SDK license agreement.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!