RadarBeacon represents a Bluetooth beacon. Learn more about Beacons .
Properties
The Radar ID of the beacon.
The description of the beacon. Not to be confused with the NSObject description property.
The external ID of the beacon.
The major ID of the beacon.
The minor ID of the beacon.
The optional set of custom key-value pairs for the beacon.
The location of the beacon. coordinate
CLLocationCoordinate2D
required
The coordinate.
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.