EILPositionedBeacon Class Reference

Inherits from NSObject
Conforms to NSCoding
Declared in EILPositionedBeacon.h
EILPositionedBeacon.m

Overview

Represents a beacon with additional information about its position. Object is immutable.

Properties

  position

Oriented point representing beacons position and orientation.

@property (nonatomic, strong, readonly) EILOrientedPoint *position

Declared In

EILPositionedBeacon.h

  identifier

Beacons identifier.

@property (nonatomic, strong, readonly) NSString *identifier

Declared In

EILPositionedBeacon.h

  color

Beacons color.

@property (nonatomic, assign, readonly) EILColor color

Declared In

EILPositionedBeacon.h

  proximityUUID

Beacons proximity UUID. Can be nil, if unknown.

@property (nonatomic, strong, readonly, nullable) NSUUID *proximityUUID

Declared In

EILPositionedBeacon.h

  major

Beacons major value. Can be nil, if unknown.

@property (nonatomic, strong, readonly, nullable) NSNumber *major

Declared In

EILPositionedBeacon.h

  minor

Beacons minor value. Can be nil, if unknown.

@property (nonatomic, strong, readonly, nullable) NSNumber *minor

Declared In

EILPositionedBeacon.h

Creating and Initializing Beacons

– initWithBeaconIdentifier:position:

Returns a new beacon object.

- (instancetype)initWithBeaconIdentifier:(NSString *)identifier position:(EILOrientedPoint *)position

Parameters

identifier

Beacon identifier (MAC address or identifier).

position

Beacon position.

Return Value

A positioned beacon initialized with identifier and position.

Declared In

EILPositionedBeacon.h

– initWithBeaconIdentifier:position:color:

Designated initializer. Returns a new beacon object.

- (instancetype)initWithBeaconIdentifier:(NSString *)identifier position:(EILOrientedPoint *)position color:(EILColor)color

Parameters

identifier

Beacon identifier (MAC address or identifier).

position

Beacon position.

color

Beacon color

Return Value

A positioned beacon initialized with identifier and position.

Declared In

EILPositionedBeacon.h

– initWithBeaconIdentifier:position:color:proximityUUID:major:minor:

Designated initializer. Returns a new beacon object.

- (instancetype)initWithBeaconIdentifier:(NSString *)identifier position:(EILOrientedPoint *)position color:(EILColor)color proximityUUID:(nullable NSUUID *)proximityUUID major:(nullable NSNumber *)major minor:(nullable NSNumber *)minor

Parameters

identifier

Beacon identifier (MAC address or identifier).

position

Beacon position.

color

Beacon color

proximityUUID

Beacon proximity UUID.

major

Beacon major value.

minor

Beacon minor value.

Return Value

A positioned beacon initialized with provided data.

Declared In

EILPositionedBeacon.h

– beaconTranslatedByDX:dY:

Returns a new beacon object.

- (instancetype)beaconTranslatedByDX:(double)dX dY:(double)dY

Parameters

dX

X beacon position translation value.

dY

Beacon Y beacon position translation value.

Return Value

A beacon with position translated by (dX, dY).

Declared In

EILPositionedBeacon.h

Serialization

+ beaconFromDictionary:

Deserializes a positioned beacon from NSDictionary.

+ (nullable EILPositionedBeacon *)beaconFromDictionary:(NSDictionary *)dict

Parameters

dict

NSDictionary to deserialize from.

Return Value

A positioned beacon created from NSDictionary.

Declared In

EILPositionedBeacon.h

– toDictionary

Serializes the positioned beacon to NSDictionary.

- (NSDictionary *)toDictionary

Return Value

A positioned beacon representation in NSDictionary.

Declared In

EILPositionedBeacon.h

Identifying and Comparing Objects

– isEqual:

Returns a boolean value that indicates whether given beacon is equal to this one.

- (BOOL)isEqual:(nullable id)other

Parameters

other

The object to be compared to the beacon. May be nil.

Return Value

YES if beacons are equal, otherwise NO.

Declared In

EILPositionedBeacon.h

– isEqualToPositionedBeacon:

Returns a boolean value that indicates whether given beacon is equal to this one.

- (BOOL)isEqualToPositionedBeacon:(nullable EILPositionedBeacon *)beacon

Parameters

beacon

The beacon object to be compared to the beacon. May be nil.

Return Value

YES if beacons are equal, otherwise NO.

Declared In

EILPositionedBeacon.h

– hash

Returns an integer that can be used as a table address in a hash table structure.

- (NSUInteger)hash

Declared In

EILPositionedBeacon.h

Describing Objects

– description

Returns a string representation of the positioned beacon.

- (NSString *)description

Return Value

A string representation of the EILPositionedBeacon.

Declared In

EILPositionedBeacon.h

Encoding and Decoding

– initWithCoder:

Returns a positioned beacon initialized from data in a given unarchiver.

- (nullable instancetype)initWithCoder:(NSCoder *)decoder

Parameters

decoder

An unarchiver object.

Return Value

A new positioned beacon initialized using the data in decoder.

Declared In

EILPositionedBeacon.h

– encodeWithCoder:

Encodes the positioned beacon segment using a given archiver.

- (void)encodeWithCoder:(NSCoder *)coder

Parameters

An

archiver object.

Declared In

EILPositionedBeacon.h