Jas_meet
Jas_meet

Reputation: 366

Is it possible to create and get triggers (enter and exit) for polygon geofencing in iOS

I want to create an app, where when user taps on mapview , it will create geofence for that locations(it could be circular , polygon or any type). I want to get notify whenever user enters or exits from the created region. I have managed to achieve with circular regions but want to do it with polygon or user defined area as well.

Please suggest.

Upvotes: 0

Views: 161

Answers (1)

ronhippler
ronhippler

Reputation: 106

Use the CLLocationManager: create a region and monitor it with startMonitoringForRegion:. For notifications use the delegate methods

locationManager:didEnterRegion:
locationManager:didExitRegion:
locationManager:didDetermineState:forRegion:

https://developer.apple.com/library/ios/documentation/CoreLocation/Reference/CLLocationManager_Class/index.html

Upvotes: 0

Related Questions