Pregunta

i want to make an app which read a QR code that contains the information of the wifi network, with this data i want to connect automatically to the wifi. I have read something about CaptiveNetwork but i can't find anything.

I want to know if that is posible to do in iOS? if it can how?

Thaks

¿Fue útil?

Solución

The API used to switch networks or connect to a new one is currently private.

If you plan to use the app on a jailbroken device check this out: https://github.com/devinshively/wifiAssociate

Otros consejos

iOS apps are sandboxed, and as such various functionality is unavailable to the app. Apple has no APIs for doing this within an app, because they don't want an app to be able to make changes to things like this and other system settings.

You have a couple possible options:

  • Display the wifi network information from the QR code and instruct the user how to go to the settings app and put it in.

  • Release your app for jailbreak devices in the Cydia app store, because once the device is jailbroken you can do stuff outside of your sandbox.

Generally, when Apple doesn't want you to do something on iOS, you have little choice but to accept that.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top