にバックグラウンドでiはestimote位置ビーコン、iPhoneの5S、IOSバージョン10didExitRegion:私のアプリケーションが殺されたときに呼び出さまたはIOS 10
didEnterRegionを使用する必要の1.5〜2分間の遅延:この方法はまた、40に30と呼ばれます秒遅れ。
iibeaconを監視するには、以下のコードを使用する必要があります。
NSUUID *uuid = [[NSUUID alloc] initWithUUIDString:@"CFC52BF4-FD33-4569-B4B5-5E9C220514A2"];
CLBeaconRegion *region = [[CLBeaconRegion alloc] initWithProximityUUID:uuid major:1 identifier:@"Technostacks23"];
region.notifyOnEntry = YES;
region.notifyOnExit = YES;
// launch app when display is turned on and inside region
region.notifyEntryStateOnDisplay = YES;
if ([CLLocationManager isMonitoringAvailableForClass:[CLBeaconRegion class]])
{
[_locationManager startMonitoringForRegion:region];
[_locationManager startRangingBeaconsInRegion:region];
}
[self.locationManager startUpdatingLocation];
#pragma mark - CoreLocation Delegate method
-(void)locationManager:(CLLocationManager *)manager didEnterRegion:(CLRegion *)region {
//local notification fire
}
-(void)locationManager:(CLLocationManager *)manager didExitRegion:(CLRegion *)region {
//local notification fire
}
このシナリオにどのように対処するか教えてください。
おかげ
これはiOS 10の普遍的な問題ではありません。私はiOS 10デバイスで多くのテストを行い、通常、非常に速いバックグラウンド検出時間を見ます。私はtryrebootingし、ハードウェアアクセラレーションスロットを解放するためにあなた自身のほかに他のビーコンアプリをuniñstallingします。 – davidgyoung
ありがとう@davidgyoung。 –