Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-21887

macos Mojave privacy requests are not working

    XMLWordPrintable

Details

    • macOS
    • 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:

      https://developer.apple.com/documentation/avfoundation/cameras_and_media_capture/requesting_authorization_for_media_capture_on_macos

      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

          For Gerrit Dashboard: QTCREATORBUG-21887
          # Subject Branch Project Status CR V

          Activity

            People

              con Eike Ziller
              ncuxer Sergey Gavrushkin
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes