Yhper
Yhper

Reputation: 193

Notify user when he enters into an area with a radius

I'm building an app that I want:

The user sets a list of 5 friends from his contact list - Done. The user sets a radius - Done (for example - 1km from the user's house) - Done. The app fetches the friends addresses (and the latitude-longtitude) the insert them into an NSMutableArray - Done. Now, I want that if the users are passing one of his friends' houses (about 100m from the friend's house) within the radius, the app will notify him that he close to the friend's house.

But if the user sets the radius to be 1km from his own house, for example, and he is passing a friend's house that the distance between his own house to the friend's house is 2km the app won't notify him.

I've tried to user this tutorial but it don't have the radius feature (it will notify just X meters when the user approaches the house, even if it outside the radius area):

http://www.raywenderlich.com/95014/geofencing-ios-swift

Please help me, Thank you very much!

Upvotes: 0

Views: 257

Answers (0)

Related Questions