Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
6.7.0 RC2
-
None
-
macOS 14.4
Xcode 15.3
CMake 3.28.3
iOS 16.7.6
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.