CLBeaconRegion没有从终止中调用didEnterRegion

Ril*_*eyE 5 bluetooth cllocationmanager ios bluetooth-lowenergy ios7

我一直在做一些阅读CLBeaconRegion,我已经成功设置了一些iBeacons并让它触发位置更新,即使应用程序在后台也是如此.

但是,根据我的阅读和结转CLRegion,我理解应该可以locationManager:didEnterRegion:在应用程序终止后点击.

我设置了CLBeaconRegion这样的:

beaconRegion = [[CLBeaconRegion alloc] initWithProximityUUID:[[NSUUID alloc] initWithUUIDString:SERVICE_UUID]
                                                       major:0
                                                       minor:0
                                                  identifier:BEACON_ID];
[beaconRegion setNotifyOnEntry:YES];
[beaconRegion setNotifyOnExit:YES];
[beaconRegion setNotifyEntryStateOnDisplay:YES];
Run Code Online (Sandbox Code Playgroud)

但我无法触发CLLocationManager终止的代表.我已离开该区域(通过通知确认),远离灯塔,等待30秒,然后返回信标,但它终止时不触发代表(在后台和前景工作很好) ).

这应该终止吗?我错过了什么吗?任何帮助都会很棒.

Dun*_*n C 4

我相信,当您在后台或未运行时,它会调用 locationManager:didDetermineState:forRegion: 而不是 locationManager:didEnterRegion:,并且仅当您将 notificationEntryStateOnDisplay 设置为 TRUE 时。