Conforms to NSObject
Declared in BeaconPlus.h

Overview

The BeaconPlusDelegate protocol implements methods that informs the reciever on successful initialization of the SDK, spot entry and exit updates, and also failure messages. The protocol should be called from the receiver class for obtaining appropriate messages from the SDK.

Tasks

Instance Methods

beaconPlusDidInitialize

Method to inform the app after the SDK has initialized successfully

- (void)beaconPlusDidInitialize

Return Value

No return value

Discussion

After initializing, the SDK will send success message to the receiver via this method. The receiver should call any methods on the SDK only after the SDK has been initialized. Otherwise the SDK will send appropriate error messages to the didFailWithError method

- (void)beaconPlusDidInitialize {
    NSLog(@"BeaconPlus SDK initialized successfully");
}

Declared In

BeaconPlus.h

didEnterSpot:

Spot entry update to the reciever carrying the current location information of the receiver

- (void)didEnterSpot:(Spot *)spot

Parameters

spot

The Spot class which carries information regarding the spot that is in range now. It consists of an array of contents along with the basic spot info, i.e., spot id, location co-ordinates, etc. Though an array of devices is also passed along with the spot info, the array will not contain any device info

Return Value

No return value

Discussion

A message to this method would be send from the SDK each time a new spot has been detected. The spot entry updates would also be send for those spots that were detected earlier but were later reported as out of range. If the receiver have access to more than one spot at a particular time, then spot entry update would be send in accordance to the receiver’s proximity to it. Only those contents that are valid at the current point of time will be delivered. Also contents will be delivered in order of their proximity to the beacon and as per the priority set by the user.

if ([spot isKindOfClass:[Spot class]]) {
    NSLog(@"spot_id : %@", spot.spot_id);
}

Declared In

BeaconPlus.h

didExitSpot:

Spot exit update carrying information regarding the spot that the user has just left

- (void)didExitSpot:(Spot *)spot

Parameters

spot

The Spot class which carries information regarding the spot that the receiver has just left. It consists of an array of contents along with the basic spot info, i.e., spot id, location co-ordinates, etc. Though an array of devices is also passed alomg with the spot info, the array will not contain any device info

Return Value

No return value

Discussion

A message to this method would be send from the SDK each time the reciever leaves a spot. The spot exit updates will only be send for those spots that were previously reported as in range. Only those contents that are valid at the current point of time will be delivered. Contents shall be delivered in the order of proximity, i.e., from short to long and as per the priority set by the user.

if ([spot isKindOfClass:[Spot class]]) {
    NSLog(@"spot_id : %@", spot.spot_id);
}

Declared In

BeaconPlus.h

didFailWithError:

Sent when the normal working of the SDK has been affected

- (void)didFailWithError:(NSError *)error

Parameters

error

An error object containing details of the error

Return Value

No return value

Discussion

This method will send appropriate error messages to the receiver to provide information on failure. For example, a message to this method would be send when the time of usage of the SDK has expired or something unexpected occurred in between.

- (void)didFailWithError:(NSError *)error {
    NSLog(@"Error occurred : %@", error.description);
}

Declared In

BeaconPlus.h

didRangeBeacons:

Sent when the ranging mode is set to 1

- (void)didRangeBeacons:(NSArray *)beacons

Parameters

beacons

An array containing the list of all registered beacons found

Return Value

No return value

Discussion

This method will send the list of all beacons detected during the scanning cycle. If no beacons are detected, then the method will be called with 0 elements in the array.

- (void)didRangeBeacons:(NSArray *)beacons {
    NSLog(@"Array of beacons : %@", beacons.description);
}

Declared In

BeaconPlus.h