Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.9
-
iOS 18.4.1, macOS 15.4.1
-
-
iOS/tvOS/watchOS
Description
On iPhones, with iOS 18+, an already (with the phone) connected BLE device will not be discovered/availiable while rescanning. That makes BLE devices inaccessible to Qts BLE support after the first connection of the respecive device.
Steps to reproduce:
- clone https://doc.qt.io/qt-6/qtbluetooth-lowenergyscanner-example.html
- Scan for a device and connect to the device on an iOS 18 iPhone
- Close the app and make sure you see the BLE connection at Settings->Bluetooth
- Restart the app and scan again -> You will not find the BLE device anymore
(If you see the attached video, you can see I'm connecting to the EON Core (scuba diving computer), after the initial connection, the device can't be found anymore)
The same issue can be also experienced with the app subsurface: https://github.com/subsurface/subsurface
I think this is the API change causing the issue:
Before iOS 18, CoreBluetooth’s methods for scanning and retrieving connected peripherals could be called without explicitly supplying service filters (you could pass an empty array or nil and still get results). In iOS 18, Apple tightened these APIs so that both https://developer.apple.com/documentation/corebluetooth/cbcentralmanager/retrieveconnectedperipherals(withservices:)
https://developer.apple.com/forums/thread/760309
The same issue I was able to experience with Flutter and flutter_blue_plus, which is resolving the issue at version 1.33
https://github.com/chipweinberger/flutter_blue_plus/blob/master/packages/flutter_blue_plus/CHANGELOG.md
[BREAKING CHANGE] iOS 18 compatibility: systemDevices now requires UUID argument
Â