iOS how to set wifi network priority programmatically in app? - ios

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

Related

iOS How can I get wifi list around my phone?

In my project, I need get list all near by WiFi in range,
I have already done lots of research but didn't get any solution, Please any one help me for same ?
thanks very much!
By this way you can get all near by your phone
From iOS >= 4.1 it's possible to obtain SSID of wireless network that device is currenctly connected to.
For this you'd use function CNCopyCurrentNetworkInfo
Details on implemenation are available on SO: iPhone get SSID without private library
Without the use of private library (Apple80211) it will not provide you other reachable wifi list or other info but if you want devices near by you You can use multipeer connectivity.

How to get a list of wifi connections around me with its RSSI strength using Swift?

My app should scan Wifi signals around and list the network's name and its RSSI.
I can't find any clue on Google about how to do it. Could someone give an example or at least point somewhere else where I can find the answer?
I dont think its possible ! It doesnt matter if its Swift or Objective-C nor C++, the basic principle of iOS is that only system can connect to WiFi or turn on off those system setting. All you can get is info about the currently connected network. App sandbox in ios limits all other possibility.
It is only possible to get the SSID of the network that you are currently connected to.

About wifi scanning in iOS

I'm wondering if it's possible to scan wifi networking nearby like what WiFi Map did?
And in this application, it can even provide password of the wifi hotspot. Is it legal and what kind of technology is used?
I do not think this App use IOS technology to scan wifi and offer dynamic password.
In IOS,with public API,you even cannot scan available wifi nearby.
So,I think the Technology of this app is:
At first, they offer some public wifi and passowrd.
Then user use this app,and they choose to share about connected wifi.So,that the database of this app became bigger and bigger.

Automatically connect to a WiFi which has a specific SSID (atleast first few characters) from an iPad app

When a user walks into a physical store, is it possible to verify if a particular WiFi SSID is available (may be searching with first few characters) and if yes, can we automatically connect to that WiFi programmatically? Getting consent from the user for first time is OK, but if user gives the consent, we should be able to automatically connect subsequent times. I know Captive framework can be used to get the connected WiFi details, but can we leverage that framework to implement the above requirement as well? Appreciate any quick inputs.
No, this is not possible. You can indeed only get the SSID once connected.

Implementing Long Range Peer To Peer Data Exchange Over IOS

I am looking for a solution to be able to send location data between two iPhones. I looked into Bluetooth data exchange but it is only a 10 meter range.
I have looked at Bonjour, however I haven't seen anything yet that would allow you to broadcast as a server over a 3g network. Is this possible?
Would I be able to use the Game Center for sharing data that is non game related?
Thanks In Advanced...
Not true. GameCenter just passes data. It has no concept of whether the data is game date, location data, or whatever.
Also, I dont think you can't use Bonjour to find devices over 3G. I believe you have to use a game center match invitation for devices not on the same local subnet.
If both devices are connected to the same wifi network, you can use Bonjour.

Resources