简体   繁体   中英

iOS WiFi network switching

My company is developing an iPhone accessory that requires a relatively high connectivity rate to the phone. 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.

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. 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.

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?

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. AirServer just did this.

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. A lot like the location settings prompt .

3. Make an Android app!

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. iPhone doesn't even try using cellular data when connected to wifi, being that wifi connected to the Internet or not.

You could file a bug report requesting these features and pray Apple hears you which will probably never happen in this case.

I would suggest going bluetooth, but if usb is not fast enough for you, guess that's not an option either.

That pretty much puts you back to square one and going usb. Or distributing your app via Cydia.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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