Search code examples
iosobjective-cibeaconestimote

why ESTBeaconManager conforms to CLLocationManagerDelegate


I am now using estimote's ibeacon tags and I am new to the iOS coding,while I read through the implementations of their customized beaconmanager and beaconmanagerdelegate class.I found that the "ESTBeaconManager"(http://estimote.github.io/iOS-SDK/Classes/ESTBeaconManager.html) conforms to the "CLLocationManagerDelegate",which is the apple's core location manager delegate.

However, the ESTBeaconManager doesn't implement any of the "CLLocationManagerDelegate" methods, while the "ESTBeaconManager" class has its own delegate protocol called "ESTBeaconManagerDelegate", in these protocol a lot of methods which are similar to those in the are declared in "CLLocationManagerDelegate", and we can use them to trigger some events when the beconmanager find something or get chaged.

So, my question is, what is the point of ESTBeaconManager's conforming to the "CLLocationManagerDelegate", and what is the mechanism under this, that we know the system will trigger the methods in the "CLLocationManagerDelegate" since they are made by apple. But the customized methods in the "ESTBeaconManagerDelegate" must be trigger by calling them in the customized codes(maybe through the CLLocationManagerDelegate, is that right?).


Solution

  • The Estimote SDK is partly based on Apple's Core Location API, to power its ranging and beacon region monitoring features. The SDK builds on top of that to add some additional features, like an option to filter out "unknown state" beacons (avoidUnknownStateBeacons) or to merge ranging results from multiple regions into a single didRangeBeaconsInRegion callback (returnAllRangedBeaconsAtOnce) etc. It also adds integration with Estimote Cloud, e.g. to download additional beacon properties (like color) from the Cloud.

    All in all, ESTBeaconManager conforming to CLLocationManagerDelegate is an implementation detail and you don't need to worry about it to use the SDK.