調用didEnterRegion我一直在做一些閱讀有關CLBeaconRegion
和我已經安裝了一些iBeacons成功,把它觸發位置更新,即使該應用程序在後臺運行。CLBeaconRegion不是從終端
但是,根據我已閱讀並從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];
但我無法從終止觸發CLLocationManager
的代表。我已經離開該地區(通過通知確認),前往遠離燈塔,等待30秒,然後前往回標,但同時終止它不會觸發委託(工作在背景和前景巨大,而)。
應該終止這項工作?我錯過了什麼嗎?任何幫助都會很棒。
在此背景下,它仍然調用'的LocationManager:didEnterRegion:',如'的LocationManager:didDetermineState:forRegion:',不過,從我的測試中,它不會調用無論是從終止狀態(用戶刷卡應用程序)。我的'notifyEntryStateOnDisplay'也設置爲'YES' /'TRUE'。 – RileyE