iOS アプリケーションで非常に奇妙な動作をします。ほとんどの場合、ビーコン監視は正常に機能していますが、didEnterRegionおよびdidExitRegionイベントが連続して複数回発生する時間帯があります。ビーコン自体は電話のすぐ隣 (約 15 cm) にあるため、 didExitRegionはまったく存在しないはずです。出口をトリガーするビーコン信号を失う可能性があることは知っていますが、3分間に約5回トリガーされます(入り口と出口の両方-つまり10回の呼び出し)。これは非常にまれな動作であり、ランダムなようです。
ビーコンは、Estimoteからのもので、Estimote アプリを介して、約 3.5 メートル/12 フィート (Estimote アプリによる) である必要がある -20dBm のブロードキャスト電力と 2000 ミリ秒の広告間隔に設定されます。
私のCLLocationManagerの初期化
if (! _locationManager) {
_locationManager = [[CLLocationManager alloc] init];
if ([_locationManager respondsToSelector:@selector(setAllowsBackgroundLocationUpdates:)]) {
// Not available in iOS 8
_locationManager.allowsBackgroundLocationUpdates = YES;
}
// For iOS 8
if ([_locationManager respondsToSelector:@selector(requestAlwaysAuthorization)]) {
[_locationManager requestAlwaysAuthorization];
}
_locationManager.pausesLocationUpdatesAutomatically = NO;
_locationManager.delegate = self;
}
それが私が監視を開始する方法です
- (void)startMonitoringForBeaconRegions {
for (CLBeaconRegion *currentBeaconRegion in _beaconRegions) {
//default should be YES
currentBeaconRegion.notifyOnEntry = YES;
currentBeaconRegion.notifyOnExit = YES;
[_locationManager startMonitoringForRegion:currentBeaconRegion];
}
}
誰かがビーコンとおそらく解決策で同様の動作をしていますか??
敬具、キャアク