简体   繁体   中英

iOS how to set wifi network priority programmatically in app?

Here is our app usage scenario: There are two sections in our app, the first one is that we need load google map, and use google map apis, and the second one is that we need to connect to a personal wifi which can't connect to the public network. So the contradiction is that we can't use these two sections at the same time, if we connect to the personal wifi, we couldn't use google map, and when we disconnect to the wifi, we couldn't use the second section.

Does anybody have wonderful idea to solve this problem which has confused us a couple of days.

Thanks for any suggestion

Each wifi comes with its SSID, you can get the wifi SSID with CaptiveNetwork

Example on how to use it in this question

Basically if its your private wifi SSID then enable the 2nd, else enable google map stuff, i hope its what u want

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