iOS_developer
iOS_developer

Reputation: 3

iBeacons monitoring notification distance

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!

Upvotes: 0

Views: 106

Answers (1)

davidgyoung
davidgyoung

Reputation: 64941

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

Upvotes: 1

Related Questions