0

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?

Roksalt
  • 481
  • 6
  • 19

1 Answers1

4

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.

Community
  • 1
  • 1
damirstuhec
  • 6,069
  • 1
  • 22
  • 39
  • Awesome thanks for the great [quick] answer. I will look into it – Roksalt Feb 27 '14 at 00:12
  • No problem! Let us know how it goes :) – damirstuhec Feb 27 '14 at 00:14
  • Can this works on this situation: If a certain wifi is connected to the phone, then get a notification or notify or wake up my app and do a check-in thing? Like auto check-in feature? In this case my app may already been killed by the user or is dead in the background. So can this possible to wake it up? Like the Geo Fences thing? Thanks – Yuan Fu Oct 29 '18 at 00:09
  • Hi damirstuhec, can you please have a look this question? Thanks https://stackoverflow.com/questions/53037286/how-to-detect-iphone-connect-to-a-certain-wifi – Yuan Fu Oct 29 '18 at 00:27