Вопрос

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

Это было полезно?

Решение

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

Другие советы

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top