Proximity based actions based on Wi-Fi signal - ios

Does iOS support proximity based actions when detecting a specific Wi-Fi signal?
E.g. similarly to what happens with iBeacons is it possible to detect entering a Wi-Fi region?
I have found this article on Wi-Fi Aware which is interesting:
http://www.wi-fi.org/beacon/rolf-de-vegt/wi-fi-aware-a-platform-for-proximity-based-wi-fi-innovation

Unfortunately, iOS does not provide third party apps access to visible WiFi networks.
There are private APIs that some apps use to detect the name of the currently connected WiFi network, but that is of limited use because a user will not connect to every WiFi network when moving around. The CoreLocation component of the operating system itself does use visible WiFi networks to help infer it's latitude and longitude, but the mechanism is internal, closed source and not exposed to the user.

Related

Accessing wifi info with RSSI in iOS

I am well aware that Apple has not exposed any api's to fetch nearby WiFi access-points and display them as a list for the user to choose with the RSSI signal strength.
There are several hidden and private api's available which does help in finding the WiFi Hotspots nearby the iPhone , but I read that if we use them our app will be outright rejected from Apple Appstore.
NEHotSpotHelper from NetworkExtension framework also will not fit to my use case.
So I was wondering how it is implemented when I came across the Qardio Scale app in appstore which helps the user to identify and fetch nearby wifi hotspots and allows the user to choose one so that the qardio scale can connect into.

How to determine location source in iOS

I'm getting current location,
In my app I want to know my location is from GPS or WIFI or cellular data. How do I check that ?
Is there any way to determine location source ?
Apple iOS uses
Assisted Global Positioning System (A-GPS)
Crowdsourced Wi-Fi
Cellular network search
to determine your location:
These three stages are used in descending order of priority. In other words, iOS first attempts to fix your location by using a GPS satellite link. If it is unable to acquire a satellite, iOS fails over to Wi-Fi. If you are not connected to a Wi-Fi local area network (WLAN), then iOS uses cell tower data
Apple uses all the non-GPS systems simultaneously with GPS, as part of A-GPS. To say it's falling back is not really an accurate description. Rather, while trying to get a GPS lock, it will use the other systems to get a rough idea of your location. Only if no GPS lock can be obtained, will the phone simply report what it knows from the other sources.
CoreLocation does not provide its source (or sources), but you can use some heuristics to guess.
Check the accuracy reported with location updates. A large range (e.g. 500+ meters) would indicate it's not a GPS fix.
Check which radios are available. If there's no cellular radio in the device, fixes must come from Wifi.
Check if the cellular radio is active. The device does not need service with available providers to use towers for a fix. Don't filter on that.
Those are my best guesses. If you really want this feature, you'll have to experiment.

How to implement Event based Real time campaigning in ios?

We have already implemented beacon based real time campaigns, like setting some campaigns to some beacons and depending on the ranges we can fetch them and show it inside app as a popup. now my question is how to do the same thing using wifi?
Like: I have to monitor the wifi that associated in a particular area, then depending upon the monitored wifi I have to display the respective campaign associated with that.
Ex: I have 4 wifi networks in 1 building, all wifi is associated with one one campaign so total 4 campaigns are there, now my app should first monitor the nearest wifi and connect to that and get the respective campaign
Can anybody suggest how to achieve this?
Unlike iBeacons, currently its not possible to detect multiple wi-fi signals in your code.
Secondly, measuring wi-fi signal strength is not as straight forward.
Lastly, iBeacons are based on a bluetooth standard which provide a correlation between RSSI value (signal strength) and distance from the beacon, assuming you are using a standard beacon. This is not true for wi-fi as signal strength largely depends on the network hardware.
In spite of all these points, it is theoretically possible to create a controlled environment with specific wi-fi hardware which can allow you to know distance based on signal strength. But that is way too broad to be discussed in a SO question.

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.

Only allow check-in if certain Wifi Network is detected

So i'm working on an iOS application that was going to use GPS location data to determine if a user was within a certain radius of a building and allow them to check-in.. I know setting up geo fences is fairly easy...
however
Is it possible to only allow users to checkin once a wireless signal for a particular Wifi network is detected instead? I would like to do this because we are in a building that doesn’t get GPS reception and only gets triangulation from the cell towers – this is going to lead to quite a wide radius...
Any thoughts?
You could solve your case with checking SSID of the Wifi the user is currently connected to.
if (SSID_of_currently_connected_wifi == SSID_value_for_building_wifi)
{
//user can check-in.
}
You can get SSID of currently connected Wifi with SystemConfiguration framework. See: https://stackoverflow.com/a/5198968/1677480.
You cannot get a list of available/detected Wifi network without private API's. See: https://stackoverflow.com/a/9684945/1677480.
If you will choose "GPS location" solution you can help yourself with my answer (based on distance between 2 GPS locations) here: https://stackoverflow.com/a/22036318/1677480.

Resources