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

iOS/CMake missing permission plugins

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 6.7.0 RC2
    • Build System: CMake
    • None
    • macOS 14.4
      Xcode 15.3
      CMake 3.28.3
      iOS 16.7.6
    • iOS/tvOS/watchOS

    Description

      After updating from Qt 6.5.1 to Qt 6.7.0 RC2 the camera stopped working.

      Error in the console: 

      Could not request QCameraPermission. Please make sure you have included the required usage description in your Info.plist
      

      It looks like others had problems with this as well: See Qt-Forum Topic

      Depending on where find_package(Qt6 ... ) is put in the CMake project the permission plugin will end up on the link line or not.

      In the Qt Docs it is suggested to structure the project like this:

      src/CMakeLists.txt
      find_package(Qt6 ... )
      add_subdirectory(App1)
      add_subdirectory(App2)
      
      src/App1/CMakeLists.txt
      qt_add_executable(App1 main.cpp)
      # ...
      
      src/App2/CMakeLists.txt
      qt_add_executable(App2 main.cpp)
      # ...
      

      For this structure the permission plugin will be missing.

      If I do it like that the permission plugin is found:

      src/CMakeLists.txt
      add_subdirectory(App1)
      add_subdirectory(App2)
      
      src/App1/CMakeLists.txt
      find_package(Qt6 ... )
      qt_add_executable(App1 main.cpp)
      # ...
      
      src/App2/CMakeLists.txt
      find_package(Qt6 ... )
      qt_add_executable(App2 main.cpp)
      # ...
      

      Example projects will follow.

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            Marscho Marscho
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes