Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Bluetooth Low Energy Scanner example permissions
QtWS25 Last Chance

Bluetooth Low Energy Scanner example permissions

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 203 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nga_tom
    wrote on 29 Mar 2025, 15:39 last edited by
    #1

    Building bluetoothlowenergyscanner example from Qt 6.8.2. - builds fine no issues, but when I go to run the example I get the following error:
    qt.permissions: Could not find permission plugin for QBluetoothPermission. Please make sure you have included the required usage description in your Info.plist
    This example has no info.plist so how do I get this to run?

    Tom

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 29 Mar 2025, 19:48 last edited by
      #2

      Hi and welcome to devnet,

      You can find that information in the iOS platform notes in Qt's documentation.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • N Offline
        N Offline
        nga_tom
        wrote on 30 Mar 2025, 02:04 last edited by
        #3

        I guess this example has not been updated. 6.8.2 now used QPermission instead of plist. So I guess I need to update the app to handle this permission issue.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 30 Mar 2025, 07:47 last edited by
          #4

          I haven't use QPermission yet however I don't see how it replaces the plist file.

          QPermission allows to easily request and check permission however it does not replace things like iOS specific requirements such as providing proper justification for specific permissions.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • P Offline
            P Offline
            Paul Colby
            wrote on 30 Mar 2025, 08:07 last edited by Paul Colby
            #5

            Hi @nga_tom,

            As per the docs:

            Apple platforms

            Each permission you request must be accompanied by a so called usage description string in the application's Info.plist file, describing why the application needs to access the given permission.

            <key>NSMicrophoneUsageDescription</key>
            <string>The microphone is used to record voice memos.</string>
            

            Here's a complete example from one of my open source Qt projects: https://github.com/pcolby/dokit/blob/e734041b06e48d7aaf577bafa86359d05e001d05/src/cli/Info.plist.in#L27

            You basically want to drop an Info.plist file that includes a NSBluetoothAlwaysUsageDescription key/value, into your application binary's directory.

            You could also search the qtconnectivity repo for Info.plist to see some other examples, such as this one for the btscanner example: https://github.com/qt/qtconnectivity/blob/6f114cfd71ff970c6244d89e2d79f15c4229b2c6/tests/manual/examples/btscanner/Info.plist

            Cheers.

            1 Reply Last reply
            1

            2/5

            29 Mar 2025, 19:48

            • Login

            • Login or register to search.
            2 out of 5
            • First post
              2/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved