Cannot identify Beacon in the background

Originator:thomas.j.bennett
Number:rdar://17488463 Date Originated:27-Jun-2014
Status:Open Resolved:
Product:iOS SDK Product Version:7
Classification:Feature Request Reproducible:NA
 
I'm working on an application which allows users to check-in without having to interact with their iOS device by utilizing iBeacons. In order to implement this feature, I need the major and minor identifiers for a beacon region. Unfortunately, locationManager:didEnterRegion: does not include such identifying information, only the beacon's identifier.

With the current implementation, we need to start ranging for a beacon in order to get the major / minor values. Unfortunately, ranging only works in the foreground, which prevents this from being a truly seamless experience.

Steps to Reproduce:
Scenario 1: 
Step 1:Implement CLLocationManagerDelegate and start monitoring for a beacon region. 
Step 2: Enter the beacon region while the app is in the background or the device is asleep. 

Scenario 2: 
Step 1: Implement CLLocationManagerDelegate and start monitoring for a beacon region. In the delegate's locationManager:didEnterRegion: method, start ranging. 
Step 2: Enter the beacon region while the app is in the background or the device is asleep. 


Expected Results:
Scenario 1: Major / Minor information is included in the CLRegion object passed with locationManager:didEnterRegion: 

Scenario 2: Ranging starts while in the background, allowing access to major / minor values while the app is in the background.

Actual Results:
Scenario 1: The major / minor value are not included with locationManager:didEnterRegion:. These values are only available when ranging in the foreground.

Scenario 2: Ranging does not start until the app enters the foreground.

Version:
iOS 7.1.1

Notes:
Ideally, major / minor information would be included in the CLRegion object passed with locationManager:didEnterRegion: 

Configuration:
iPhone 5 64 GB using wifi and cellular (AT&T)

Comments

not sure if you are still looking at this but if you want to do this in the background - you need to use region monitoring as opposed to ranging - in which way you register for events from a given number of major/minor beacons and get notifications from the OS to your app when these regions are entered by implementing some of the delegate methods. note that you need to be granted the 'always' permission - as opposed to the 'when in use'.

By john.douglas at April 10, 2019, 5:04 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!