Inherits from NSObject
Declared in UBUriBeaconScanner.h

Overview

UBUriBeaconScanner will scan for UriBeacons and configurable UriBeacons. It will scan for beacons when the application is running in the background if the application supports it. You’ll need to add the background capability bluetooth-central in the Info.plist file. When it’s scanning in background, only non-configurable beacons will be discovered.

Here’s an example of how to scan beacons:

_scanner = [[UBUriBeaconScanner alloc] init];
[_scanner startScanningWithUpdateBlock:^{
   NSLog(@"beacons: %@", [_scanner beacons]);
   NSLog(@"configurable beacons: %@", [_scanner configurableBeacons]);
}];

Instance Methods

beacons

Returns the list of nearby UriBeacons.

- (NSArray *)beacons

Declared In

UBUriBeaconScanner.h

configurableBeacons

Returns the list of UriBeacons that can be configured.

- (NSArray *)configurableBeacons

Declared In

UBUriBeaconScanner.h

startScanningWithUpdateBlock:

Start discovering UriBeacons. It will check frequently for beacon to know whether some appear or disappear.

- (void)startScanningWithUpdateBlock:(void ( ^ ) ( void ))block

Parameters

block

The block will be called when there’s a change in the list of beacons or configurable beacons.

Declared In

UBUriBeaconScanner.h

stopScanning

Stop discovery of UriBeacons and configurable UriBeacons.

- (void)stopScanning

Declared In

UBUriBeaconScanner.h