Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-136692

BLE devices can't be discovered/used after initial connection on iOS 18+

    XMLWordPrintable

Details

    • iOS/tvOS/watchOS
    • 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:

      1. clone https://doc.qt.io/qt-6/qtbluetooth-lowenergyscanner-example.html
      2. Scan for a device and connect to the device on an iOS 18 iPhone
      3. Close the app and make sure you see the BLE connection at Settings->Bluetooth
      4. 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
       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vuokko Juha Vuolle
            bmahr80 Ben Mahr
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes