Inherits from NSObject
Conforms to NSCopying
Declared in RECOBeaconRegion.h

Overview

RECOBeaconRegion object defines a type of region that is based on the device’s proximity to a Bluetooth beacon. A beacon region looks for devices whose identifying information matches the information you provide. When that device comes in range, the region triggers the delivery of an appropriate notification.

You can monitor beacon regions in two ways. To receive notifications when a device enters or exits the vicinity of a beacon, use the startMonitoringForRegion: method of your RECOBeaconManager object. While a beacon is in range, you can also call the startRangingBeaconsInRegion: method to begin receiving notifications when the relative distance to the beacon changes.

A RECOBeaconRegion object contains an instance of CLRegion which can be obtained by getCLRegion method. For more details about CLRegion, please refer to here

Properties

identifier

The identifier for the region object. (read-only)

@property (nonatomic, strong) NSString *identifier

Discussion

The identifier for the region object. (read-only)

This is a value that you specify and can use to identify this region inside your application.

Declared In

RECOBeaconRegion.h

major

The value identifying a group of beacons. (read-only)

@property (nonatomic, strong) NSNumber *major

Discussion

The value identifying a group of beacons. (read-only)

If you do not specify a major value for the beacon, the value in this property is nil. When this property is nil, the major value of the beacon is ignored when determining if it is a match.

Declared In

RECOBeaconRegion.h

minor

The value identifying a specific beacon within a group. (read-only)

@property (nonatomic, strong) NSNumber *minor

Discussion

The value identifying a specific beacon within a group. (read-only)

If you do not specify a minor value for the beacon, the value in this property is nil. When this property is nil, the minor value of the beacon is ignored when determining if it is a match.

Declared In

RECOBeaconRegion.h

proximityUUID

The unique ID of the beacons being targeted. (read-only)

@property (nonatomic, strong) NSUUID *proximityUUID

Discussion

The unique ID of the beacons being targeted. (read-only)

Declared In

RECOBeaconRegion.h

Instance Methods

getCLRegion

Get the instance of CLRegion which RECOBeaconRegion object is based on.

- (CLRegion *)getCLRegion

Return Value

The CLRegion object.

Discussion

Get the instance of CLRegion which RECOBeaconRegion object is based on.

Every RECOBeaconRegion object contains an instance of CLRegion. This method returns the CLRegion object.

Declared In

RECOBeaconRegion.h

getNotifyOnEntry

A Boolean indicating that notifications are generated upon entry into the region.

- (BOOL)getNotifyOnEntry

Return Value

When this property is YES, a device crossing from outside the region to inside the region triggers the delivery of a notification. If the property is NO, a notification is not generated. The default value of this property is YES.

Discussion

A Boolean indicating that notifications are generated upon entry into the region.

Declared In

RECOBeaconRegion.h

getNotifyOnExit

A Boolean indicating that notifications are generated upon exit from the region.

- (BOOL)getNotifyOnExit

Return Value

When this property is YES, a device crossing from inside the region to outside the region triggers the delivery of a notification. If the property is NO, a notification is not generated. The default value of this property is YES

Discussion

A Boolean indicating that notifications are generated upon exit from the region.

Declared In

RECOBeaconRegion.h

initWithProximityUUID:identifier:

Initializes and returns a region object that targets a beacon with the specified proximity ID.

- (id)initWithProximityUUID:(NSUUID *)uuid identifier:(NSString *)identifier

Parameters

uuid

The unique ID of the beacons being targeted. If this value is nil, UUID will be set to the one provided by Perples Inc. by default.

identifier

A unique identifier to associate with the returned region object. You use this identifier to differentiate regions within your application. This value must not be nil.

Return Value

An initialized RECOBeaconRegion object.

Discussion

Initializes and returns a region object that targets a beacon with the specified proximity ID.

This method creates a region that results in the reporting of all beacons with the specified proximityUUID value. The major and minor values of the beacons are ignored.

Declared In

RECOBeaconRegion.h

initWithProximityUUID:major:identifier:

Initializes and returns a region object that targets a beacon with the specified proximity ID and major value.

- (id)initWithProximityUUID:(NSUUID *)uuid major:(RECOBeaconMajorValue)major identifier:(NSString *)identifier

Parameters

uuid

The unique ID of the beacons being targeted. If this value is nil, UUID will be set to the one provided by Perples Inc. by default.

major

The major value that you use to identify one or more beacons.

identifier

A unique identifier to associate with the returned region object. You use this identifier to differentiate regions within your application. This value must not be nil.

Return Value

An initialized RECOBeaconRegion object.

Discussion

Initializes and returns a region object that targets a beacon with the specified proximity ID and major value.

This method creates a region that reports all beacons with the specified proximityUUID and major values. The beacon’s minor value is ignored.

Declared In

RECOBeaconRegion.h

initWithProximityUUID:major:minor:identifier:

Initializes and returns a region object that targets a beacon with the specified proximity ID, major value, and minor value.

- (id)initWithProximityUUID:(NSUUID *)uuid major:(RECOBeaconMajorValue)major minor:(RECOBeaconMinorValue)minor identifier:(NSString *)identifier

Parameters

uuid

The unique ID of the beacons being targeted. If this value is nil, UUID will be set to the one provided by Perples Inc. by default.

major

The major value that you use to identify one or more beacons.

minor

The minor value that you use to identify a specific beacon.

identifier

A unique identifier to associate with the returned region object. You use this identifier to differentiate regions within your application. This value must not be nil.

Return Value

An initialized RECOBeaconRegion object.

Discussion

Initializes and returns a region object that targets a beacon with the specified proximity ID, major value, and minor value.

This method creates a region that reports the beacon with the specified proximityUUID, major, and minor values.

Declared In

RECOBeaconRegion.h

setNotifyOnEntry:

A Boolean indicating that notifications are generated upon entry into the region.

- (void)setNotifyOnEntry:(BOOL)notifyOnEntry

Parameters

notifyOnEntry

When this property is YES, a device crossing from outside the region to inside the region triggers the delivery of a notification. If the property is NO, a notification is not generated. The default value of this property is YES.

Discussion

A Boolean indicating that notifications are generated upon entry into the region.

Declared In

RECOBeaconRegion.h

setNotifyOnExit:

A Boolean indicating that notifications are generated upon exit from the region.

- (void)setNotifyOnExit:(BOOL)notifyOnExit

Parameters

notifyOnExit

When this property is YES, a device crossing from inside the region to outside the region triggers the delivery of a notification. If the property is NO, a notification is not generated. The default value of this property is YES

Discussion

A Boolean indicating that notifications are generated upon exit from the region.

Declared In

RECOBeaconRegion.h