Skip to main content
RadarBeacon represents a Bluetooth beacon. Learn more about Beacons.

Properties

_id
String
The Radar ID of the beacon.
__description
String
The description of the beacon. Not to be confused with the NSObject description property.
tag
String
The tag of the beacon.
externalId
String
The external ID of the beacon.
uuid
String
required
The UUID of the beacon.
major
String
required
The major ID of the beacon.
minor
String
required
The minor ID of the beacon.
metadata
NSDictionary
The optional set of custom key-value pairs for the beacon.
geometry
RadarCoordinate
The location of the beacon.
rssi
NSInteger
required
The RSSI (Received Signal Strength Indicator) of the beacon, or 0 if not available.

Methods

arrayForBeacons

+ (NSArray<NSDictionary *> *_Nullable)arrayForBeacons:(NSArray<RadarBeacon *> *_Nullable)beacons;
Converts an array of RadarBeacon objects to an array of dictionaries.

dictionaryValue

- (NSDictionary *_Nonnull)dictionaryValue;
Returns the dictionary representation of the beacon.

Example

let beacon: RadarBeacon = event.beacon
let beaconId = beacon._id
let beaconDescription = beacon.__description
let beaconTag = beacon.tag
let beaconExternalId = beacon.externalId
let beaconUuid = beacon.uuid
let beaconMajor = beacon.major
let beaconMinor = beacon.minor
let beaconMetadata = beacon.metadata
let beaconGeometry = beacon.geometry
let beaconRssi = beacon.rssi
RadarBeacon *beacon = event.beacon;
NSString *beaconId = beacon._id;
NSString *beaconDescription = beacon.__description;
NSString *beaconTag = beacon.tag;
NSString *beaconExternalId = beacon.externalId;
NSString *beaconUuid = beacon.uuid;
NSString *beaconMajor = beacon.major;
NSString *beaconMinor = beacon.minor;
NSDictionary *beaconMetadata = beacon.metadata;
RadarCoordinate *beaconGeometry = beacon.geometry;
NSInteger beaconRssi = beacon.rssi;
The RSSI value indicates the signal strength of the beacon. Higher values (closer to 0) indicate stronger signals, while lower values (more negative) indicate weaker signals.