GNSBeaconStrategy Class

GNSBeaconStrategy Class Reference

Overview

The strategy to use to scan for beacons.

Inherits NSObject.

Class Method Summary

(instancetype) + strategy
 Returns the default strategy, which uses the default values for all properties. More...
 
(instancetype) + strategyWithParamsBlock:
 Returns a custom strategy. You can set any of the optional properties in paramsBlock. More...
 

Property Summary

BOOL includeIBeacons
 Scan also for nearby iBeacons. More...
 
BOOL allowInBackground
 Try to scan for beacons when the app is in the background. More...
 
BOOL lowPowerPreferred
 Low power mode is available when scanning for Eddystone beacons only; it is ignored when iBeacons are included. More...
 

Method Detail

+ (instancetype) strategy

Returns the default strategy, which uses the default values for all properties.

+ (instancetype) strategyWithParamsBlock: (void(^)(GNSBeaconStrategyParams *))  paramsBlock

Returns a custom strategy. You can set any of the optional properties in paramsBlock.

Property Detail

- (BOOL) includeIBeacons
readnonatomicassign

Scan also for nearby iBeacons.

The default is YES. Scanning for iBeacons triggers a location permission dialog from iOS, so you should set this to NO if you don't want to scan for iBeacons.

- (BOOL) allowInBackground
readnonatomicassign

Try to scan for beacons when the app is in the background.

The default is NO.

- (BOOL) lowPowerPreferred
readnonatomicassign

Low power mode is available when scanning for Eddystone beacons only; it is ignored when iBeacons are included.

Turn off low power mode if you prefer lower latency scanning, at a higher battery cost.

The default is YES.