Inherits from NSObject
Declared in SBKBeacon.h

Overview

The SBKBeacon class defines the interface of a sensoro beacon device. You can use instances of this class to get rssi, sensor data or configurate device settings. You do not create instances of this class directly. Use SBKBeaconManager to get SBKBeacon instances.

The identity of a beacon is defined by its beaconID properties.

Properties

accelerometerCount

The number of accelerometer count.

@property (readonly, nonatomic, copy) NSNumber *accelerometerCount

Discussion

The number of accelerometer count.

Sensor data can only be updated when the app is running in the foreground.

Declared In

SBKBeacon.h

accuracy

The accuracy of the proximity value, measured in meters from the beacon. (read-only)

@property (readonly, nonatomic) CLLocationAccuracy accuracy

Discussion

The accuracy of the proximity value, measured in meters from the beacon. (read-only)

Indicates the one sigma horizontal accuracy in meters. Use this property to differentiate between beacons with the same proximity value. Do not use it to identify a precise location for the beacon. Accuracy values may fluctuate due to RF interference. A negative value in this property signifies that the actual accuracy could not be determined.

Declared In

SBKBeacon.h

assignedPeripheral

The CBPeripheral object assign to this beacon.

@property (readonly, nonatomic, strong) CBPeripheral *assignedPeripheral

Discussion

The CBPeripheral object assign to this beacon.

Declared In

SBKBeacon.h

baseSettings

The dictionary of beacon base configuration attributes. (read-only)

@property (readonly, nonatomic) NSDictionary *baseSettings

Discussion

The dictionary of beacon base configuration attributes. (read-only)

This property will be available after connect. For available options, see SBKBeaconBaseSettings.

Declared In

SBKBeacon.h

batteryLevel

The battery charge level for the device. (read-only)

@property (readonly, nonatomic, copy) NSNumber *batteryLevel

Discussion

The battery charge level for the device. (read-only)

Battery level ranges from 0.0 to 1.0 (100% charged).

Declared In

SBKBeacon.h

beaconID

A SBKBeaconID object identify the beacon. (read-only)

@property (readonly, nonatomic, copy) SBKBeaconID *beaconID

Discussion

A SBKBeaconID object identify the beacon. (read-only)

Declared In

SBKBeacon.h

delegate

The delegate of the app object.

@property (readwrite, nonatomic, weak) id<SBKBeaconDelegate> delegate

Discussion

The delegate of the app object.

Declared In

SBKBeacon.h

firmwareVersion

The current firmware version for the device. (read-only)

@property (readonly, nonatomic, copy) NSString *firmwareVersion

Discussion

The current firmware version for the device. (read-only)

Declared In

SBKBeacon.h

hardwareModelName

The model of the device. (read-only)

@property (readonly, nonatomic, copy) NSString *hardwareModelName

Discussion

The model of the device. (read-only)

Declared In

SBKBeacon.h

inRange

Returns a Boolean value that indicates whether the beacon is in range. (read-only)

@property (readonly, nonatomic, assign) BOOL inRange

Discussion

Returns a Boolean value that indicates whether the beacon is in range. (read-only)

Beacon will be marked out of range after approximate 8 second in order to prevent notifications delivering too frequently.

Declared In

SBKBeacon.h

light

The ambient light level in lux.

@property (readonly, nonatomic, copy) NSNumber *light

Discussion

The ambient light level in lux.

Sensor data can only be updated when the app is running in the foreground.

Declared In

SBKBeacon.h

moving

Flag indicating accelerometer state, boolean value wrapped in NSNumber.

@property (readonly, nonatomic, copy, getter=isMoving) NSNumber *moving

Discussion

Flag indicating accelerometer state, boolean value wrapped in NSNumber.

Sensor data can only be updated when the app is running in the foreground.

Declared In

SBKBeacon.h

proximity

The relative distance to the beacon. (read-only)

@property (readonly, nonatomic, assign) CLProximity proximity

Discussion

The relative distance to the beacon. (read-only)

The value in this property gives a general sense of the relative distance to the beacon. Use it to quickly identify beacons that are nearer to the user rather than farther away.

Declared In

SBKBeacon.h

rssi

The received signal strength of the beacon, measured in decibels. (read-only)

@property (readonly, nonatomic, assign) NSInteger rssi

Discussion

The received signal strength of the beacon, measured in decibels. (read-only)

If beacon is out of range, the value will be 0.

Declared In

SBKBeacon.h

sensorSettings

The dictionary of sensor configuration attributes. (read-only)

@property (readonly, nonatomic) NSDictionary *sensorSettings

Discussion

The dictionary of sensor configuration attributes. (read-only)

This property will be available after connect. For available options, see SBKBeaconSensorSettings.

Declared In

SBKBeacon.h

serialNumber

The beacon’s hardware serial number. (read-only)

@property (readonly, nonatomic, copy) NSString *serialNumber

Discussion

The beacon’s hardware serial number. (read-only)

Declared In

SBKBeacon.h

temperature

Temperature value in Celsius

@property (readonly, nonatomic, copy) NSNumber *temperature

Discussion

Temperature value in Celsius

Sensor data can only be updated when the app is running in the foreground.

Declared In

SBKBeacon.h

writePermissionStatus

Indicates if the application has permission to write setting to the beacon.

@property (readonly, nonatomic) SBKBeaconWritePermissionStatus writePermissionStatus

Discussion

Indicates if the application has permission to write setting to the beacon.

Declared In

SBKBeacon.h

Instance Methods

availableEnergySavingMode

Which energy saving mode the beacon supports.

- (SBKBeaconEnergySavingMode)availableEnergySavingMode

Return Value

Which energy saving mode the beacon supports.

Declared In

SBKBeacon.h

connectWithCompletion:

Establishes a connection to a beacon.

- (void)connectWithCompletion:(SBKBeaconCompletionBlock)completion

Parameters

completion

The block to execute after the connecting is completed. If error parameter is nil means connection has been established successfully.

Discussion

Establishes a connection to a beacon.

Declared In

SBKBeacon.h

connectionStatus

The current status of the connection.

- (SBKBeaconConnectionStatus)connectionStatus

Return Value

A SBKBeaconConnectionStatus enum value.

Discussion

The current status of the connection.

Declared In

SBKBeacon.h

disconnect

Cancels an active or pending connection to a beacon.

- (void)disconnect

Discussion

Cancels an active or pending connection to a beacon.

Declared In

SBKBeacon.h

isAccelerometerAvailable

Flag indicating whether accelerometer sensor is available.

- (BOOL)isAccelerometerAvailable

Return Value

Flag indicating whether accelerometer sensor is available.

Declared In

SBKBeacon.h

isLightSensorAvailable

Flag indicating whether light sensor is available.

- (BOOL)isLightSensorAvailable

Return Value

Flag indicating whether light sensor is available.

Declared In

SBKBeacon.h

isTemperatureSensorAvailable

Flag indicating whether temperature sensor is available.

- (BOOL)isTemperatureSensorAvailable

Return Value

Flag indicating whether temperature sensor is available.

Declared In

SBKBeacon.h

reloadSensorDataWithCompletion:

Causes beacon to reload temperature and light sensors data immediately.

- (BOOL)reloadSensorDataWithCompletion:(SBKBeaconCompletionBlock)completion

Parameters

completion

The block to execute after the operation is completed. If error parameter is nil means success.

Return Value

Can this operation be executed.

Discussion

Causes beacon to reload temperature and light sensors data immediately.

Declared In

SBKBeacon.h

requireWritePermissionWithPassword:completion:

You should use this method to request write permission if writePermissionStatus property is restricted.

- (BOOL)requireWritePermissionWithPassword:(NSString *)password completion:(SBKBeaconCompletionBlock)completion

Parameters

password

Password string.

completion

The block to execute after the operation is completed. If error parameter is nil means success.

Return Value

Can this operation be executed.

Discussion

You should use this method to request write permission if writePermissionStatus property is restricted.

Declared In

SBKBeacon.h

resetAccelerometerCountWithCompletion:

Resets accelerometer counter value to zero.

- (BOOL)resetAccelerometerCountWithCompletion:(SBKBeaconCompletionBlock)completion

Parameters

completion

The block to execute after the writing is completed. If error parameter is nil means writing successfully.

Return Value

Can this operation be executed.

Discussion

Resets accelerometer counter value to zero.

Declared In

SBKBeacon.h

resetToFactorySettingsWithCompletion:

Resets beacon to factory settings. This will reset proximityUUID, major, minor, baseSettings and sensorSettings to original values.

- (BOOL)resetToFactorySettingsWithCompletion:(SBKBeaconCompletionBlock)completion

Parameters

completion

The block to execute after the writing is completed. If error parameter is nil means writing successfully.

Return Value

Can this writing operation be executed.

Discussion

Resets beacon to factory settings. This will reset proximityUUID, major, minor, baseSettings and sensorSettings to original values.

Declared In

SBKBeacon.h

updateWritePassword:completion:

Changes the beacon’s password.

- (BOOL)updateWritePassword:(NSString *)password completion:(SBKBeaconCompletionBlock)completion

Parameters

password

New password string.

completion

The block to execute after the writing is completed. If error parameter is nil means writing successfully.

Return Value

Can this writing operation be executed.

Discussion

Changes the beacon’s password.

Declared In

SBKBeacon.h

writeBaseSettings:completion:

Updates base settings of this beacon.

- (BOOL)writeBaseSettings:(NSDictionary *)settings completion:(SBKBeaconCompletionBlock)completion

Parameters

settings

Configuration attributes you try to update in a dictionary. For available options, see SBKBeaconBaseSettings.

completion

The block to execute after the writing is completed. If error parameter is nil means writing successfully.

Return Value

Can this writing operation be executed.

Discussion

Updates base settings of this beacon.

Declared In

SBKBeacon.h

writeMajor:minor:completion:

Updates major and minor of this beacon.

- (BOOL)writeMajor:(NSNumber *)major minor:(NSNumber *)minor completion:(SBKBeaconCompletionBlock)completion

Parameters

major

The major value.

minor

The minor value.

completion

The block to execute after the writing is completed. If error parameter is nil means writing successfully.

Return Value

Can this writing operation be executed.

Discussion

Updates major and minor of this beacon.

Declared In

SBKBeacon.h

writeProximityUUID:completion:

Updates proximity UUID of this beacon.

- (BOOL)writeProximityUUID:(NSUUID *)proximityUUID completion:(SBKBeaconCompletionBlock)completion

Parameters

proximityUUID

Proximity UUID in NSUUID object.

completion

The block to execute after the writing is completed. If error parameter is nil means writing successfully.

Return Value

Can this writing operation be executed.

Discussion

Updates proximity UUID of this beacon.

Declared In

SBKBeacon.h

writeSensorSettings:completion:

Updates sensor settings of this beacon.

- (BOOL)writeSensorSettings:(NSDictionary *)settings completion:(SBKBeaconCompletionBlock)completion

Parameters

settings

Configuration attributes you try to update in a dictionary. For available options, see SBKBeaconSensorSettings.

completion

The block to execute after the writing is completed. If error parameter is nil means writing successfully.

Return Value

Can this writing operation be executed.

Discussion

Updates sensor settings of this beacon.

Declared In

SBKBeacon.h