ABBeacon Class Reference

Inherits from NSObject
Conforms to NSCopying
Declared in ABBeacon.h

Overview

ABBeacon defines properties of April beacon, you can get parameters of iBeacon from ABBeacon

Publicly available properties

  proximityUUID

proximityUUID

@property (nonatomic, strong) NSUUID *proximityUUID

Discussion

proximityUUID

Proximity identifier associated with the beacon.

Declared In

ABBeacon.h

  major

major

@property (nonatomic, strong) NSNumber *major

Discussion

major

Most significant value associated with the region. If a major value wasn’t specified, this will be nil.

Declared In

ABBeacon.h

  minor

minor

@property (nonatomic, strong) NSNumber *minor

Discussion

minor

Least significant value associated with the region. If a minor value wasn’t specified, this will be nil.

Declared In

ABBeacon.h

  rssi

rssi

@property (nonatomic) NSInteger rssi

Discussion

rssi

Received signal strength in decibels of the specified beacon. This value is an average of the RSSI samples collected since this beacon was last reported.

Declared In

ABBeacon.h

  proximity

proximity

@property (nonatomic) CLProximity proximity

Discussion

proximity

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

ABBeacon.h

  macAddress

macAddress

@property (nonatomic, strong) NSString *macAddress

Discussion

macAddress

Discussion: Hardware MAC address of the beacon.

Declared In

ABBeacon.h

  distance

@property (nonatomic, strong) NSNumber *distance

Discussion

proximity

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

ABBeacon.h

  measuredPower

measuredPower

@property (nonatomic, strong) NSNumber *measuredPower

Discussion

measuredPower

rssi value measured from 1m. This value is used for device calibration.

Declared In

ABBeacon.h

Properties available after connection

  peripheral

peripheral

@property (nonatomic, strong) CBPeripheral *peripheral

Discussion

peripheral

peripheral object of beacon.

Declared In

ABBeacon.h

  isConnected

firmwareUpdateInfo

@property (nonatomic, readonly) BOOL isConnected

Discussion

firmwareUpdateInfo

Flag indicating connection status.

Declared In

ABBeacon.h

  txPower

beacon power

@property (nonatomic) ABTxPower txPower

Discussion

beacon power

enum values of power, @see ABTxPower.

Declared In

ABBeacon.h

  advInterval

advInterval

@property (nonatomic, strong) NSNumber *advInterval

Discussion

advInterval

Advertising interval of the beacon. Value change from 100ms to 2000ms, The unit is 100ms. Value available after connection with the beacon

Declared In

ABBeacon.h

  batteryLevel

batteryLevel

@property (nonatomic, strong) NSNumber *batteryLevel

Discussion

batteryLevel

Battery strength in %. Battery level change from 100% - 0%. Value available after connection with the beacon

Declared In

ABBeacon.h

  firmwareRevision

firmwareRevision

@property (nonatomic, strong) NSString *firmwareRevision

Discussion

firmwareRevision

Firmware revision of beacon. Value available after connection with the beacon

Declared In

ABBeacon.h

  manufacturerName

manufacturerName

@property (nonatomic, strong) NSString *manufacturerName

Discussion

manufacturerName

Manufacturer name of beacon. Value available after connection with the beacon

Declared In

ABBeacon.h

  modelNumber

modelNumber

@property (nonatomic, strong) NSString *modelNumber

Discussion

modelNumber

Model number of beacon. Value available after connection with the beacon

Declared In

ABBeacon.h

  isSupportEddystone

isSupportEddystone

@property (nonatomic) BOOL isSupportEddystone

Discussion

isSupportEddystone

is beacon support Google Eddystone protocol. Value available after connection with the beacon

Declared In

ABBeacon.h

  broadcastType

broadcastType

@property (nonatomic) ABBroadcastType broadcastType

Discussion

broadcastType

if isSupportEddystone is true, use this to check the broadcast type. Value available after connection with the beacon ABBeaconBroadcastiBeacon Default type ABBeaconBroadcastEddystoneUid broadcast UUID is proximityUUID ABBeaconBroadcastEddystoneURL broadcast URL is eddyStoneURL

Declared In

ABBeacon.h

  eddyStoneURL

eddyStoneURL

@property (nonatomic, strong) NSString *eddyStoneURL

Discussion

eddyStoneURL

if broadcast type is ABBeaconBroadcastEddystoneURL, use this to get broadcast URL. Value available after connection with the beacon

Declared In

ABBeacon.h

Connection handling methods

– connectToBeacon

Connect to particular beacon using bluetooth. Connection is required to change values like Major, Minor, Power and Advertising interval.

- (void)connectToBeacon

Return Value

void

Discussion

Connect to particular beacon using bluetooth. Connection is required to change values like Major, Minor, Power and Advertising interval.

Declared In

ABBeacon.h

– disconnectBeacon

Disconnect device with particular beacon

- (void)disconnectBeacon

Return Value

void

Discussion

Disconnect device with particular beacon

Declared In

ABBeacon.h

– writeBeaconInfoByPassword:uuid:major:minor:txPower:advInterval:measuredPower:newpassword:withCompletion:

Writes beacon info to connected beacon If you set the password to nil, it will use the default password If you set value to nil, it won’t modify the value

- (void)writeBeaconInfoByPassword:(NSString *)password uuid:(NSString *)uuidString major:(NSNumber *)major minor:(NSNumber *)minor txPower:(NSNumber *)txPower advInterval:(NSNumber *)advInterval measuredPower:(NSNumber *)measuredPower newpassword:(NSString *)newpassword withCompletion:(ABCompletionBlock)completion

Parameters

password

auth password, default ‘AprilBrother’

uuidString

new Proximity UUID value

major

new major of iBeacon

minor

new minro of iBeacon

txPower

@(ABTxPower) tx power

advInterval

advertise interval

measuredPower

measured power of iBeacon

newpassword

new password

completion

callback

Return Value

void

Discussion

Writes beacon info to connected beacon If you set the password to nil, it will use the default password If you set value to nil, it won’t modify the value

Declared In

ABBeacon.h

– writeBeaconInfoByPassword:uuid:major:minor:txPower:advInterval:measuredPower:newpassword:broadcastType:withCompletion:

Writes beacon info to connected beacon If you set the password to nil, it will use the default password If you set value to nil, it won’t modify the value

- (void)writeBeaconInfoByPassword:(NSString *)password uuid:(NSString *)uuidString major:(NSNumber *)major minor:(NSNumber *)minor txPower:(NSNumber *)txPower advInterval:(NSNumber *)advInterval measuredPower:(NSNumber *)measuredPower newpassword:(NSString *)newpassword broadcastType:(ABBroadcastType)type withCompletion:(ABCompletionBlock)completion

Parameters

password

auth password, default ‘AprilBrother’, ‘195660’ for EEK beacon

uuidString

new Proximity UUID value

major

new major of iBeacon

minor

new minro of iBeacon

txPower

@(ABTxPower) tx power

advInterval

advertise interval

measuredPower

measured power of iBeacon

newpassword

new password

type

broadcast type

completion

callback

Return Value

void

Discussion

Writes beacon info to connected beacon If you set the password to nil, it will use the default password If you set value to nil, it won’t modify the value

Declared In

ABBeacon.h

– writeEddyStoneURLAndReset:broadcastType:password:txPower:advInterval:newpassword:completion:

Writes beacon info to connected beacon If you set the password to nil, it will use the default password If you set value to nil, it won’t modify the value

- (void)writeEddyStoneURLAndReset:(NSString *)url broadcastType:(ABBroadcastType)type password:(NSString *)password txPower:(NSNumber *)txPower advInterval:(NSNumber *)advInterval newpassword:(NSString *)newpassword completion:(ABCompletionBlock)completion

Parameters

url

broadcast url

type

broadcast type

password

auth password, default ‘AprilBrother’, ‘195660’ for EEK beacon

completion

callback

Return Value

void

Discussion

Writes beacon info to connected beacon If you set the password to nil, it will use the default password If you set value to nil, it won’t modify the value

Declared In

ABBeacon.h

– writeEddyStoneUidAndReset:broadcastType:password:txPower:advInterval:newpassword:completion:

Writes beacon info to connected beacon If you set the password to nil, it will use the default password If you set value to nil, it won’t modify the value

- (void)writeEddyStoneUidAndReset:(NSString *)uuidString broadcastType:(ABBroadcastType)type password:(NSString *)password txPower:(NSNumber *)txPower advInterval:(NSNumber *)advInterval newpassword:(NSString *)newpassword completion:(ABCompletionBlock)completion

Parameters

uuidString

broadcast UUID

type

broadcast type

password

auth password, default ‘AprilBrother’, ‘195660’ for EEK beacon

completion

callback

Return Value

void

Discussion

Writes beacon info to connected beacon If you set the password to nil, it will use the default password If you set value to nil, it won’t modify the value

Declared In

ABBeacon.h