有没有办法在iOS中以编程方式打开和关闭wifi?

有没有办法在iOS中以编程方式打开和关闭wifi?

问题描述:

我使用此链接上的代码完成蓝牙操作:
有没有办法在iOS中以编程方式打开和关闭蓝牙和/或wifi?

I done it for Bluetooth using the code on this link: Is there a way to toggle bluetooth and/or wifi on and off programmatically in iOS?

但我无法弄清楚如何为Wifi做同样的事情。你如何打开/关闭Wifi?有可能吗?

But I couldn't figure out how to do the same for Wifi. How do you switch the Wifi on/off? Is it possible ?

在iOs 2.x中,您可以使用一些私有API来执行此操作,但它不起作用iOS4.x,5.x。希望Apple公开用于管理Wifi的API,现在它仅用于设置apple app。

In iOs 2.x you can use some private API to do this, however it does not work in iOS4.x, 5.x. Hope that Apple will public the API for manage Wifi, now it is only used by Setting apple app.