ABBeaconManager Class Reference
Inherits from | NSObject |
---|---|
Declared in | ABBeaconManager.h |
Overview
The ABBeaconManager class defines the interface for handling and configuring the April beacons and get related events to your application. You use an instance of this class to establish the parameters that describes each beacon behavior. You can also use a beacon manager object to retrieve all beacons in range.
A beacon manager object provides support for the following location-related activities:
- Monitoring distinct regions of interest and generating location events when the user enters or leaves those regions (works in background mode).
- Reporting the range to nearby beacons and ther distance for the device.
Other Methods
avoidUnknownStateBeacons
Allows to avoid beacons with unknown state (proximity == 0), when ranging. Default value is NO.
@property (nonatomic) BOOL avoidUnknownStateBeacons
Discussion
Allows to avoid beacons with unknown state (proximity == 0), when ranging. Default value is NO.
Declared In
ABBeaconManager.h
– requestWhenInUseAuthorization
See CLLocationManager requestWhenInUseAuthorization
- (void)requestWhenInUseAuthorization
Discussion
See CLLocationManager requestWhenInUseAuthorization
Declared In
ABBeaconManager.h
– requestAlwaysAuthorization
See CLLocationManager requestAlwaysAuthorization
- (void)requestAlwaysAuthorization
Discussion
See CLLocationManager requestAlwaysAuthorization
Declared In
ABBeaconManager.h
CoreLocation based iBeacon monitoring and ranging methods
– startRangingBeaconsInRegion:
Range all April beacons that are visible in range. Delegate method beaconManager:didRangeBeacons:inRegion: is used to retrieve found beacons. Returned NSArray contains ABBeacon objects.
- (void)startRangingBeaconsInRegion:(ABBeaconRegion *)region
Parameters
region |
April beacon region |
---|
Return Value
void
Discussion
Range all April beacons that are visible in range. Delegate method beaconManager:didRangeBeacons:inRegion: is used to retrieve found beacons. Returned NSArray contains ABBeacon objects.
Declared In
ABBeaconManager.h
– stopRangingBeaconsInRegion:
Stops ranging April beacons.
- (void)stopRangingBeaconsInRegion:(ABBeaconRegion *)region
Parameters
region |
April beacon region |
---|
Return Value
void
Discussion
Stops ranging April beacons.
Declared In
ABBeaconManager.h
– startMonitoringForRegion:
Start monitoring for particular region. Functionality works in the background mode as well. Every time you enter or leave region appropriet delegate method inovked: beaconManager:didEnterRegtion: and beaconManager:didExitRegion:
- (void)startMonitoringForRegion:(ABBeaconRegion *)region
Parameters
region |
April beacon region |
---|
Return Value
void
Discussion
Start monitoring for particular region. Functionality works in the background mode as well. Every time you enter or leave region appropriet delegate method inovked: beaconManager:didEnterRegtion: and beaconManager:didExitRegion:
Declared In
ABBeaconManager.h
– stopMonitoringForRegion:
Unsubscribe application from iOS monitoring of April beacon region.
- (void)stopMonitoringForRegion:(ABBeaconRegion *)region
Parameters
region |
April beacon region |
---|
Return Value
void
Discussion
Unsubscribe application from iOS monitoring of April beacon region.
Declared In
ABBeaconManager.h
– requestStateForRegion:
Allows to validate current state for particular region
- (void)requestStateForRegion:(ABBeaconRegion *)region
Parameters
region |
April beacon region |
---|
Return Value
void
Discussion
Allows to validate current state for particular region
Declared In
ABBeaconManager.h
Turning device into iBeacon
– startAdvertisingWithProximityUUID:major:minor:identifier:
Allows to turn device into virtual April beacon.
- (void)startAdvertisingWithProximityUUID:(NSUUID *)proximityUUID major:(CLBeaconMajorValue)major minor:(CLBeaconMinorValue)minor identifier:(NSString *)identifier
Parameters
proximityUUID |
proximity UUID beacon value |
---|---|
major |
minor beacon value |
minor |
major beacon value |
identifier |
unique identifier for you region |
Return Value
void
Discussion
Allows to turn device into virtual April beacon.
Declared In
ABBeaconManager.h
– stopAdvertising
Stop beacon advertising
- (void)stopAdvertising
Return Value
void
Discussion
Stop beacon advertising
Declared In
ABBeaconManager.h