[MacOS] Ask user for permission to access microphone

This is required for MacOS 10.14 and later. This also requires an explanation why
access is required in the apps Info.plist. Hence added custom Info.plist templates
for each app.
This commit is contained in:
Roland Rossgotterer
2019-05-06 16:14:24 +02:00
committed by Klaus Basan
parent 61adfefa7a
commit 5f00747d19
14 changed files with 355 additions and 30 deletions

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>swift gui</string>
<key>CFBundleDisplayName</key>
<string>swift gui</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleGetInfoString</key>
<string>swift project - free and open source pilot client</string>
<key>CFBundleIconFile</key>
<string>${ASSETCATALOG_COMPILER_APPICON_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>${QMAKE_PKGINFO_TYPEINFO}</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
<key>NSMicrophoneUsageDescription</key>
<string>This application needs access to your Microphone for Vatsim Voice.</string>
</dict>
</plist>

View File

@@ -29,6 +29,9 @@ target.path = $$PREFIX/bin
INSTALLS += target
macx {
QMAKE_TARGET_BUNDLE_PREFIX = "org.swift-project"
QMAKE_INFO_PLIST = Info.plist
# Modifies plugin path
qtconf.path = $$PREFIX/bin/swiftguistd.app/Contents/Resources
qtconf.files = qt.conf