CoreBluetooth Advertising and Scanning Issue in iOS 18/iPadOS 18 Beta 3

Hello,

Has anyone encountered issues with CoreBluetooth advertising and scanning between iOS 18/iPadOS 18 Beta 3 ? I'm want to know this is a bug or an intended change in behavior.

Issue Summary:

  • Central device on iOS 18/iPadOS 18 Beta 3 (foreground) and Peripheral device on iOS 17.5.1 (background) fail to communicate via BLE advertising.
  • The reverse setup or using non-iOS 18 devices works as expected.

Detailed Description:

I am developing an iOS/iPadOS application using CoreBluetooth for advertising and scanning. Here are the specifics of my setup:

  • The application uses a fixed BLE service UUID, and scanning is performed with the specified service UUID.
  • Background Modes Uses Bluetooth LE accessories and Acts as a Bluetooth LE accessory are enabled to allow advertising and scanning even when the app is in the background.

When the Central device is running iOS 18/iPadOS 18 Beta 3 and the app is in the foreground scanning, and the Peripheral device is running iOS 17.5.1 with the app in the background advertising, the Central device cannot receive the advertisements from the Peripheral device. ( CBCentralManagerDelegate.centralManager(_:didDiscover:advertisementData:rssi:) don't work.)

  • In the reverse scenario (Central on iOS 17.5.1 in the foreground scanning, and Peripheral on iOS 18/iPadOS 18 Beta 3 in the background advertising), the advertisements are received correctly.
  • Additionally, advertisements are received correctly in cases where both devices are not on iOS 18/iPadOS 18.

I am wondering if anyone else has encountered this issue or if there is any information available regarding whether this is a bug or an intended behavior change in iOS 18/iPadOS 18.

Thank you.

Answered by Engineer in 795001022

While you might be running into issues with an edge case that coincidentally may have been occurring in your test case, during the beta cycles, it would be best to file a bug report to alert the Bluetooth team to any potential issues.

Please file a bug report, explaining the situation in detail at https://feedbackassistant.apple.com

It would also be useful to include some diagnostic logs with your bug. Please go to https://developer.apple.com/bug-reporting/profiles-and-logs/ and follow the instructions for Bluetooth for iOS to install a logging profile on your device.

Then, once the logging profile is installed:

  • reproduce the problem, keeping track of the actual time of the actions you take and the result you see.
  • please have your app use os_log() statements to indicate what CoreBluetooth actions it is taking
  • make sure there aren’t any extraneous BLE devices around, and no other apps are trying to connect to some other BLE device while you are conducting this test.

Once the problem is reproduced, follow the instructions at the above link to trigger a sysdiagnose, and attach the sysdiagnose from the problem device to your bug report.


Argun Tekant /  DTS Engineer / Core Technologies

While you might be running into issues with an edge case that coincidentally may have been occurring in your test case, during the beta cycles, it would be best to file a bug report to alert the Bluetooth team to any potential issues.

Please file a bug report, explaining the situation in detail at https://feedbackassistant.apple.com

It would also be useful to include some diagnostic logs with your bug. Please go to https://developer.apple.com/bug-reporting/profiles-and-logs/ and follow the instructions for Bluetooth for iOS to install a logging profile on your device.

Then, once the logging profile is installed:

  • reproduce the problem, keeping track of the actual time of the actions you take and the result you see.
  • please have your app use os_log() statements to indicate what CoreBluetooth actions it is taking
  • make sure there aren’t any extraneous BLE devices around, and no other apps are trying to connect to some other BLE device while you are conducting this test.

Once the problem is reproduced, follow the instructions at the above link to trigger a sysdiagnose, and attach the sysdiagnose from the problem device to your bug report.


Argun Tekant /  DTS Engineer / Core Technologies

I have the exact same problem in the same configuration but cannot find any idea to fix that, it seems that there are some internal changes that nobody talked yet 🤔

I'm also seeing the exact same problem with iOS 18 in my app 'Murmur : Bluetooth Group Calls'. A filtered scan with specified ServiceUUID on an iOS 18 central (tested with iPhone 15 Pro and 12) in foreground will not detect an iOS (any version) Peripheral in background mode. This has been working on all previous versions of iOS - so is a breaking change in iOS 18.

This bug massively impacts my application.

The Issue

iOS 18 CoreBluetooth - scanForPeripherals method with a defined CBUUID is not able to detect iPhone peripherals advertising in the background state.

Setup

  • iPhone A (peripheral) - Advertising a service with a specific CBUUID myServiceUUID
  • iPhone B (central) - Scanning using the method sCentralManager.scanForPeripherals(withServices: [myServiceUUID])

Test Cases

  • iPhone B (with iOS 18) - detects iPhone A in the foreground state (app open in the foreground)
  • iPhone B (with iOS 18) - DOES NOT detect iPhone A in the background state (app in background; not terminated)
  • iPhone B (with iOS 17 and below) - detects iPhone A in both foreground and background states

NOTE: iPhone A could be any version of iOS

I am facing the same problem with our own hardware device operating in the peripheral role. scanForPeripherals works on my iPhone SE v3 running iOS 18 and earlier, but not on iPhone 15+ running 17.6.1 or iPhone 11 running 17.7. It had been working for years on earlier iPhone and iOS versions.

Hi,

I just tested with iOS 18.0.1 with the same issue. As soon as the peripheral device enters into background, the central device does not receive callbacks to

CBCentralManagerDelegate.centralManager(_:didDiscover:advertisementData:rssi:)

when scanning with scanForPeripherals(withServices:options:)

This worked before changing to iOS 18 and SWIFT 6.

Does anyone have some news about this topic or some feedback from Apple?

Thank you!

Hello, I get a similar issue.

Predefined Service CBUUID and start scan using this method scanForPeripherals(withServices:)

iOS 17 can detect. but iOS 18 can't detect predefined Service CBUUID in foreground.

Weirdly Android advertise same service CBUUID signal, iOS18 can detect Android service.

My app and bluetooth service had worked fine during ios17.

Hey folks. I also was running into that issue, exactly as described by jiro33.

I faced the issue on iOS/iPadOS 18.0.1, even before installing any beta update.

After testing, it seems devs have fixed the issue by iOS/iPadOS 18.1 Beta 7. 🙌 I'm not sure if it was fixed in an earlier beta update, or the one I mentioned.

Thanks for opening this thread, it saved me days of bashing my head against the keyboard.

Cheers!

Hey,

I tested with iOS 18.1 (22B82) and it works again.

Thank you!

CoreBluetooth Advertising and Scanning Issue in iOS 18/iPadOS 18 Beta 3
 
 
Q