简体   繁体   English

iOS WiFi网络切换

[英]iOS WiFi network switching

My company is developing an iPhone accessory that requires a relatively high connectivity rate to the phone. 我的公司正在开发一种iPhone配件,它需要相对较高的手机连接速率。 Due to MFi limitations (USB 2 communications in HOST mode fair only around 100KBps), we're looking at hosting a WiFi ad-hoc network on our accessory, and connecting to that network with the iPhone's WiFi. 由于MFi的限制(主机模式下的USB 2通信仅约100KBps),我们正在寻找在我们的配件上托管WiFi ad-hoc网络,并使用iPhone的WiFi连接到该网络。

This could really work out great in many regards, except we can't seem to find an (Apple-approved) way to programmatically switch the iPhone's WiFi connectivity. 在许多方面,这可能真的很棒,除了我们似乎无法找到(Apple批准的)方式来以编程方式切换iPhone的WiFi连接。 Ideally the app would automatically connect to the accessory's network when visible, and then re-connect to the user's preferred network when not visible/needed. 理想情况下,应用程序会在可见时自动连接到配件的网络,然后在不可见/不需要时重新连接到用户的首选网络。

We are aware of the MobileWiFi framework, which fits the technical bill, but won't pass Apple's approval process. 我们知道MobileWiFi框架符合技术法案,但不会通过Apple的审批流程。

Can anybody suggest a way to achieve our goal? 任何人都可以提出一种方法来实现我们的目标吗? Perhaps there is a system model view that can be called up to allow the user to switch WiFi networks without directly using private APIs? 也许有一个系统模型视图可以被调用以允许用户在不直接使用私有API的情况下切换WiFi网络?

Creative solutions welcome! 欢迎创意解决方案

Hate to say it, there's really no way to do it. 讨厌说,没有办法做到这一点。 I can think of two easy workarounds. 我可以想到两个简单的解决方法。

1. Make it available on Cydia for jailbroken devices. 1.在Cydia上为越狱设备提供。 AirServer just did this. AirServer就这样做了。

2. Less elegant, have UIAlertView with a switch over to the wifi pane of the Settings app that is shown when the peripheral is connected and disconnected. 2.不太优雅,将UIAlertView切换到设置应用程序的wifi窗格,该窗格在连接和断开外围设备时显示。 A lot like the location settings prompt . 很像位置设置提示

3. Make an Android app! 3.制作Android应用程序!

Apple, you're a pain in the ass. 苹果,你的屁股很痛苦。

Sorry to be the bearer of bad news, but the definite answer is no. 很抱歉成为坏消息的承担者,但肯定的答案是否定的。 The main problem with your approach wouldn't even be Apple's approval process, but the inability to access the Internet while connected to your device. 您的方法的主要问题甚至不是Apple的批准过程,而是在连接到您的设备时无法访问Internet。 iPhone doesn't even try using cellular data when connected to wifi, being that wifi connected to the Internet or not. 当连接到wifi时,iPhone甚至不尝试使用蜂窝数据,因为无线连接到互联网。

You could file a bug report requesting these features and pray Apple hears you which will probably never happen in this case. 您可以提交请求这些功能的错误报告,并祈祷Apple听到您在这种情况下可能永远不会发生的事情。

I would suggest going bluetooth, but if usb is not fast enough for you, guess that's not an option either. 我建议去蓝牙,但如果usb对你来说不够快,那么猜测也不是一个选择。

That pretty much puts you back to square one and going usb. 这几乎让你回到正方形并走向usb。 Or distributing your app via Cydia. 或通过Cydia分发您的应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM