iOS6在非越狱设备上切换WiFi [英] iOS6 toggle WiFi on non-jailbroken device

查看:236
本文介绍了iOS6在非越狱设备上切换WiFi的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个内部iOS应用程序( NOT FOR APPLE STORE ,所以我很乐意使用私有API),我希望能够以编程方式打开或关闭wifi 。我想这样做的原因是,有些WiFi路由器每当互联网连接中断时,iPad就无法恢复WiFi - 开启/关闭WiFi可以解决问题。

I am developing an in-house iOS application (NOT FOR APPLE STORE, so I am happy to go for private API) and I would like to be able to toggle the wifi on or off programmatically. The reason for why I want to do this is that with some WiFi routers whenever the internet connection is interrupted it happens that iPad is not able to restore the WiFi - toggling the WiFi on/off solves the problem however.

在SO和Google上搜索了一天后,我找不到最近的帖子。是否可以在iOS 6上,无需越狱设备,使用私有API切换WiFi开启/关闭。有没有人有他可以分享的源代码?

After searching around for a day on SO and Google I could not find any recent posts. Is it possible on iOS 6, without jailbreaking the device, to toggle the WiFi on/off with private APIs. Does anybody have source code he could share?

推荐答案

我认为看看 SystemConfiguration.framework

它有一组API可以使用不同的连接接口,这些接口定义为这里

It has set of API to work with different connection interfaces, which are defined here:

但是,要清楚,这只是猜测。我不确定这些API是否允许打开/关闭wifi。

However, to be clear, it's just a guess. I am not sure whether these API's will allow to turn wifi on/off.

这篇关于iOS6在非越狱设备上切换WiFi的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆