iOS 18: startRangingBeacons Stops When Display is Off in Background (Worked on iOS 17.2.1)

Issue Summary

After calling startRangingBeacons, the didRangeBeacons delegate method does not receive iBeacon scan data when the device display is turned off in the background.

Expected Behavior

On iOS 17.2.1 (iPhone 14), beacon ranging continues in the background even when the display is turned off. The same behavior is expected on iOS 18, but it is not working as intended.

Observed Behavior

On iOS 18, once the display turns off, beacon ranging stops, and the didRangeBeacons method is not triggered until the display is turned back on. • Location permission is set to “Always Allow.” • Background Modes are correctly configured (Location Updates enabled).

Steps to Reproduce

  1. Ensure location permission is set to Always Allow.
  2. Enable Background Modes → Location Updates in Xcode settings.
  3. Call startRangingBeacons(in:) in the app.
  4. Put the app in the background and turn off the display.
  5. Observe that didRangeBeacons is not triggered while the display is off.

Additional Notes

• The issue does not occur on iOS 17.2.1 (iPhone 14), where beacon ranging continues even with the display off.

• This behavior change is observed on iOS 18 across multiple devices.

Could you confirm if this is an intended change in behavior or a bug? If this is expected behavior, what alternative approach is recommended to maintain continuous beacon ranging when the display is off in the background?

Beacon ranging was never meant to work, and AFAIK never worked in the background, even prior to iOS 18, unless your app was able to stay running in the background by use of another capability (like navigation, or playing audio, etc.)

Rather, beacon ranging requires your app to not be suspended. All apps will get suspended when the screen is off unless they have a background feature that keeps them active.

Your app can make the startRangingForBeacons call anytime, while in the foreground or background. The ranging will start in either case. What changes is, when the startRangingBeacons call is made while the app is in the foreground, your app will not be suspended as long as it is in the foreground (or the display is on)

In the case of using startRangingBeacons while your app is in the background, CoreLocation still responds by starting the ranging for your app, but the system will not hold your app active for the purposes of ranging, and your app will be suspended once the allowed time in the background is spent.

If your app has the ability (and the legitimate reason) to stay active and unsuspended in the background due to other background supported activities, ranging will continue uninterrupted, as long as the other activity still prevents your app from being suspended.

So, what might have changed in iOS 18 is, whatever feature you were using to keep your app in the background active may no longer working.

It is not possible for me to guess what technique you were using to prevent app suspension, and why it may have stopped working. But I suggest you start with investigating that.


Argun Tekant /  DTS Engineer / Core Technologies

I have called startUpdatingLocation to prevent the app from transitioning to a suspended state while running in the background. Since GPS is continuously being received, I can confirm that the app is not being suspended.

func locationManager(_ manager: CLLocationManager, didRange beacons: [CLBeacon], satisfying beaconConstraint: CLBeaconIdentityConstraint) {
  print(beacons)
}

When running the above code in an iOS 18 or later environment, beacon data is received in the background as long as the screen remains on. However, when the screen turns off, the beacons array becomes empty after about 2–3 seconds. Once the screen is turned back on, beacon data starts coming in again.

In contrast, on iOS versions prior to 18, beacon scanning continues in the background regardless of whether the screen is on or off.

Has there been an internal API change related to this behavior, or is this a potential bug?

iOS 18: startRangingBeacons Stops When Display is Off in Background (Worked on iOS 17.2.1)
 
 
Q