BWBeaconManager Class Reference
Inherits from | CLLocationManager |
Conforms to | CBCentralManagerDelegate CLLocationManagerDelegate |
Declared in | BWBeaconManager.h |
Tasks
Properties
-
delegate
property
Class Methods
-
– checkAvailability
-
– setApplicationState:
-
– setForegroundScanPeriod:
-
– setForegroundBetweenScanPeriod:
-
– setBackgroundScanPeriod:
-
– setBackgroundBetweenScanPeriod:
-
– updateScanPeriods
-
– getRangedRegions
-
– getMonitoredRegions
-
– startRangingBeaconsInRegion:
-
– stopRangingBeaconsInRegion:
-
– startMonitoringForRegion:
-
– stopMonitoringForRegion:
Delegate Protocol
Instance Methods
beaconManager:didCheckAvailability:
Invoked when a Bluetooth LE availability check is complete.
- (void)beaconManager:(BWBeaconManager *)manager didCheckAvailability:(BOOL)isAvailable
Parameters
- manager
used to access BWBeaconManager object
- isAvailable
boolean value indicating availability of Bluetooth LE on device.
Declared In
BWBeaconManager.h
beaconManager:didDetermineState:forRegion:
Invoked when there’s a state transition for a monitored region or in response to a request for state via a a call to requestStateForRegion:.
- (void)beaconManager:(BWBeaconManager *)manager didDetermineState:(CLRegionState)state forRegion:(BWBeaconRegion *)region
Parameters
- manager
used to access BWBeaconManager object
- state
state of a beacon in the region
- region
state deteremined for this region
Declared In
BWBeaconManager.h
beaconManager:didEnterRegion:
Invoked when a beacon enters a monitored region.
- (void)beaconManager:(BWBeaconManager *)manager didEnterRegion:(BWBeaconRegion *)region
Parameters
- manager
used to access BWBeaconManager object
- region
a monitored beacon entered in this region
Declared In
BWBeaconManager.h
beaconManager:didExitRegion:
Invoked when a beacon exits a monitored region.
- (void)beaconManager:(BWBeaconManager *)manager didExitRegion:(BWBeaconRegion *)region
Parameters
- manager
used to access BWBeaconManager object
- region
a monitored beacon entered in this region
Declared In
BWBeaconManager.h
beaconManager:didRangeBeacons:inRegion:
Invoked when a new set of beacons are available in the specified region.
- (void)beaconManager:(BWBeaconManager *)manager didRangeBeacons:(NSArray *)beacons inRegion:(BWBeaconRegion *)region
Parameters
- manager
used to access BWBeaconManager object
- beacons
an array of BWBeacons
- region
ranged beacons in this region
Declared In
BWBeaconManager.h
checkAvailability
Check if Bluetooth LE is supported by the device. Result is received in delegate method beaconManager:didCheckAvailability:
- (void)checkAvailability
Discussion
This check will only return correct results if bluetooth is enabled on device.
Declared In
BWBeaconManager.h
getMonitoredRegions
The list of regions currently being monitored.
- (NSArray *)getMonitoredRegions
Declared In
BWBeaconManager.h
getRangedRegions
The list of regions currently being ranged.
- (NSArray *)getRangedRegions
Declared In
BWBeaconManager.h
setApplicationState:
This method informs SDK about the state application that is using this SDK. You must call this method if application state changes from foreground to backgroud or vice versa. This method is required in order to correctly function foreground/background scan periods.
- (void)setApplicationState:(UIApplicationState)appState
Parameters
- appState
active or background
Declared In
BWBeaconManager.h
setBackgroundBetweenScanPeriod:
Sets the duration in milliseconds of each Bluetooth LE scan cycle to look for iBeacons.
- (void)setBackgroundBetweenScanPeriod:(long)p
Declared In
BWBeaconManager.h
setBackgroundScanPeriod:
Sets the duration in milliseconds of each Bluetooth LE scan cycle to look for iBeacons.
- (void)setBackgroundScanPeriod:(long)p
Declared In
BWBeaconManager.h
setForegroundBetweenScanPeriod:
Sets the duration in milliseconds of each Bluetooth LE scan cycle to look for iBeacons.
- (void)setForegroundBetweenScanPeriod:(long)p
Declared In
BWBeaconManager.h
setForegroundScanPeriod:
Sets the duration in milliseconds of each Bluetooth LE scan cycle to look for iBeacons.
- (void)setForegroundScanPeriod:(long)p
Declared In
BWBeaconManager.h
startMonitoringForRegion:
Start monitoring the specified region.
- (void)startMonitoringForRegion:(BWBeaconRegion *)region
Parameters
- region
start monitoring this region.
Discussion
If a region of the same type with the same identifier is already being monitored for this application, it will be removed from monitoring. For circular regions, the region monitoring service will prioritize regions by their size, favoring smaller regions over larger regions.
This is done asynchronously and may not be immediately reflected in monitoredRegions.
Declared In
BWBeaconManager.h
startRangingBeaconsInRegion:
Start calculating ranges for beacons in the specified region.
- (void)startRangingBeaconsInRegion:(BWBeaconRegion *)region
Parameters
- region
start ranging on this region.
Declared In
BWBeaconManager.h
stopMonitoringForRegion:
Stop monitoring the specified region. It is valid to call stopMonitoringForRegion: for a region that was registered for monitoring with a different location manager object, during this or previous launches of your application.
- (void)stopMonitoringForRegion:(BWBeaconRegion *)region
Parameters
- region
stop monitoring this region.
Discussion
This is done asynchronously and may not be immediately reflected in monitoredRegions.
Declared In
BWBeaconManager.h