Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 4.8.1
-
None
-
macbook pro 15, 2015
-
-
dd0156d1facc5422464dc1b430696a0b63db605f (qt-creator/qt-creator/4.8)
Description
After updating to macOS 10.14.0 from 10.13 Qt Creator was able to run applications with policy requests and there was authorization request for microphone, camera, etc. After authorization Qt Creator was added to System Preferences -> Security & Privacy -> Privacy lists. Qt Creator is a parent process for project process so permissions were granted to Qt Creator.
I have macOS 10.14.3 clean installation and Qt Creator doesn't request for privacy authorization at all now. It looks like Apple restricted privacy settings even more and each app has to have Info.plist privacy-related texts to request the privacy settings.
Solution is to add all privacy-related texts to Qt Creator's Info.plist file (NSMicrophoneUsageDescription, NSCameraUsageDescription, etc.). I've tested it locally and after adding these texts Qt Creator start requesting for privacy permissions again.
You can read about it here:
If you want to test it on mac and you have these permissions already granted you can use tccutil reset command.
Reference for implementation can be found in iTerm2 sources - https://github.com/gnachman/iTerm2/blob/master/plists/iTerm2.plist#L105. If you run Qt Creator with sample project from iTerm2 command line (parent process is iTerm2) privacy requests are granted to iTerm
Sample code is any QAudioInput example from Qt code base.
It is quite an important issue since all new installations should be affected.
Attachments
Issue Links
- replaces
-
QTCREATORBUG-21905 Privacy violation in macOS when running program
- Closed