How can i get the notification from CoreLocation when a certain know distance instead 'didEnterRegion' delegate method?
I mean I can't receive notification when I'm on certain distance from a beacon.
Thanks!
How can i get the notification from CoreLocation when a certain know distance instead 'didEnterRegion' delegate method?
I mean I can't receive notification when I'm on certain distance from a beacon.
Thanks!
The simple answer is to use CoreLocation
ranging APIs. You will get a callback every second with a list of the exact beacons visible, and you can check the CLBeacon.accuracy
property, which returns a distance in meters.
Doing this in the background is limited to 10 seconds after entering a region. There is a special technique you need to use to extend background ranging time for this use case. See here:
http://developer.radiusnetworks.com/2014/11/13/extending-background-ranging-on-ios.html