0
votes

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!

1
Have you looked into beacon ranging? distance isn't all that precise with iBeacons - you can try to calibrate, but all you really know is "near" or "far"Paulw11

1 Answers

1
votes

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