2014-08-28 2 views

답변

0

백그라운드로하면서 무기한 비콘을 검색 할 수 연락 드릴 것입니다. 일반적으로 CLBeaconRegion을 입력하는 것으로 감지되면 약 5 초 동안 범위를 지정할 수 있으며 위치 관리자를 notifyEntryStateOnDisplay (기본값은 NO)로 구성 할 수 있으므로 사용자가 집 버튼을 누를 때와 같이 화면이 켜질 때, 당신은 범위 업데이트까지 약 5 초를 얻을 것입니다.

0

비콘을 모니터링하는 데 필요한 코드는 백그라운드에서든 포 그라운드에서든 동일합니다.

CLBeaconRegion *beaconRegion = [[CLBeaconRegion alloc] 
    initWithProximityUUID:proximityUUID 
       identifier:identifier]; 
[locationManager startMonitoringForRegion:beaconRegion]; 

그리고 다음에 콜백을 얻을 locationManager:didEnterRegion:locationManager:didExitRegion:

당신은 여기에서 자세한 내용을 읽을 수 있습니다 :이처럼 설정

https://developer.apple.com/library/ios/documentation/userexperience/Conceptual/LocationAwarenessPG/RegionMonitoring/RegionMonitoring.html

관련 문제