BRTBeaconRegionDelegate Protocol Reference
Conforms to | NSObject |
---|---|
Declared in | BRTBeaconManager.h |
Overview
BRTBeaconManagerDelegate协议定义了区域监听回调方法来响应关联的事件,必须在随APP启动的指定类中(如:AppDelegate)实现,否则无法后台响应区域监听回调事件.
– beaconManager:monitoringDidFailForRegion:withError:
required method
需要在随APP启动的指定类中(如:AppDelegate)实现,区域监听自动启动APP,才能回调成功到指定类中事件
- (void)beaconManager:(BRTBeaconManager *)manager monitoringDidFailForRegion:(BRTBeaconRegion *)region withError:(NSError *)error
Parameters
manager |
Beacon 管理器 |
---|---|
region |
Beacon 区域 |
error |
错误信息 |
Discussion
需要在随APP启动的指定类中(如:AppDelegate)实现,区域监听自动启动APP,才能回调成功到指定类中事件
区域监听失败触发的回调方法,以及关联的错误信息
Declared In
BRTBeaconManager.h
– beaconManager:didEnterRegion:
required method
需要在随APP启动的指定类中(如:AppDelegate)实现,区域监听自动启动APP,才能回调成功到指定类中事件
- (void)beaconManager:(BRTBeaconManager *)manager didEnterRegion:(BRTBeaconRegion *)region
Parameters
manager |
Beacon 管理器 |
---|---|
region |
Beacon 区域 |
Discussion
需要在随APP启动的指定类中(如:AppDelegate)实现,区域监听自动启动APP,才能回调成功到指定类中事件
在区域监听中,iOS设备进入beacon设备区域触发该方法
Declared In
BRTBeaconManager.h
– beaconManager:didExitRegion:
required method
需要在随APP启动的指定类中(如:AppDelegate)实现,区域监听自动启动APP,才能回调成功到指定类中事件
- (void)beaconManager:(BRTBeaconManager *)manager didExitRegion:(BRTBeaconRegion *)region
Parameters
manager |
Beacon 管理器 |
---|---|
region |
Beacon 区域 |
Discussion
需要在随APP启动的指定类中(如:AppDelegate)实现,区域监听自动启动APP,才能回调成功到指定类中事件
在区域监听中,iOS设备离开beacon设备区域触发该方法
Declared In
BRTBeaconManager.h
– beaconManager:didDetermineState:forRegion:
required method
需要在随APP启动的指定类中(如:AppDelegate)实现,区域监听自动启动APP,才能回调成功到指定类中事件
- (void)beaconManager:(BRTBeaconManager *)manager didDetermineState:(CLRegionState)state forRegion:(BRTBeaconRegion *)region
Parameters
manager |
Beacon 管理器 |
---|---|
state |
Beacon 区域状态 |
region |
Beacon 区域 |
Discussion
需要在随APP启动的指定类中(如:AppDelegate)实现,区域监听自动启动APP,才能回调成功到指定类中事件
在调用startMonitoringForRegion:方法,当beacon区域状态变化会触发该方法
Declared In
BRTBeaconManager.h
– beaconManagerDidStartAdvertising:error:
required method
当设备模拟iBeacon广播信息,调用该方法.
- (void)beaconManagerDidStartAdvertising:(BRTBeaconManager *)manager error:(NSError *)error
Parameters
manager |
Beacon 管理器 |
---|---|
error |
错误描述信息 |
Discussion
当设备模拟iBeacon广播信息,调用该方法.
Declared In
BRTBeaconManager.h