Skip to content
  • 0 Votes
    7 Posts
    322 Views
    S
    @SGaist thanks for the reply! I am glad that you somehow always pop up with useful hints in any thread I post :) I will rebuild it adding QTPLUGINS += permissions in my pipeline. I can test it with Qt 6.10.1 as well, since aqtinstall does list this version as available. I will report back once I have the results. Let's consider other possible issues I should track: the CI uses a provisioning profile from Apple - could it be that 6.8.3 needs it somehow updated? the app bundle built with 6.8.3 comes with frameworks which include Info.plist files, but also PrivacyInfo.xcprivacy files, while 6.5.3 does not distribute them - I don't use one for my app, but unless I am wrong (because locally-built / VM-build apps work fine), it should not affect the permissions. I am explicitly using the native multimedia backend (darwin) and I opt to not distribute ffmpeg with my app (old compatibility reasons) - don't know if that could affect if (it does not with 6.5.3) Edit: Testing with Qt 6.10.1 proved the microphone permissions is not requested, same as with 6.8.3. Adding QTPLUGINS += permissions does not change anything, microphone permission prompt still missing. I have browsed the documentation on Qt 6.6 changes in the Multimedia module and found out the following: The Qt Multimedia library no longer requests audio or video permissions, but only checks if they are provided or not. The client applications must request the permissions using the C++ or QML permissions API. I came to a conclusion that my app works when built with Qt 6.5.3 because it is the audio input configuration which touches the microphone at startup which automatically requests microphone permissions and shows the prompt. Since the Qt 6.6 change, there is need to use the permissions API. Hence I have coded the following logic called in the constructor of my audio management class: void AudioClass::requestMicrophonePermission() { QMicrophonePermission microphonePermission; switch (qApp->checkPermission(microphonePermission)) { case Qt::PermissionStatus::Undetermined: qApp->requestPermission(microphonePermission, this, &AudioManager::microphonePermissionGranted); return; case Qt::PermissionStatus::Denied: qDebug() << "Microphone permission denied."; return; case Qt::PermissionStatus::Granted: return; } } void AudioClass::microphonePermissionGranted() { qDebug() << "Microphone permission granted."; } I have tried calling it both before and after initializing the audio input in Qt 6.8.3 and unfortunately it never displays the microphone permission prompt on MacOS. Since using QPermissions did not fix the issue I have resorted to integrating a small objective-C++ helper into my application and it does work when I opt to use the following native imports: #import <AppKit/AppKit.h> #import <AVFoundation/AVFoundation.h> #import <ApplicationServices/ApplicationServices.h> #import <CoreGraphics/CoreGraphics.h> @SGaist do you think it is possible there is a bug in the permissions API of Qt that does not allow MacOS's TCC to handle permission prompts correctly?