changeset 2170:23be8dccb855

Add microphone permission request message for macOS. Thanks to Lucas Thompson for pointing out the problem & solution.
author Chris Cannam
date Fri, 04 Jan 2019 12:48:19 +0000 (2019-01-04)
parents 73fc2e6975e9
children a38d6f0f1d06
files deploy/osx/Info.plist deploy/osx/deploy.sh i18n/en.lproj/InfoPlist.strings
diffstat 3 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/deploy/osx/Info.plist	Fri Jan 04 12:47:39 2019 +0000
+++ b/deploy/osx/Info.plist	Fri Jan 04 12:48:19 2019 +0000
@@ -15,6 +15,12 @@
 	<key>CFBundleShortVersionString</key>
 	<string>SV_VERSION</string>
 
+	<!-- Provide an explanatory string for microphone usage so
+	     that access is requested. NB this is localised in
+	     the *.lproj/InfoPlist.strings files -->
+	<key>NSMicrophoneUsageDescription</key>
+	<string>Sonic Visualiser needs to use the microphone for recording.</string>
+
 	<!-- enable HiDPI -->
 	<key>NSPrincipalClass</key>
 	<string>NSApplication</string>
--- a/deploy/osx/deploy.sh	Fri Jan 04 12:47:39 2019 +0000
+++ b/deploy/osx/deploy.sh	Fri Jan 04 12:48:19 2019 +0000
@@ -63,6 +63,10 @@
 echo "Done: check $source/Contents/Info.plist for sanity please"
 
 echo
+echo "Copying in lproj directories containing InfoPlist.strings translation files."
+cp -r i18n/*.lproj "$source"/Contents/Resources/
+
+echo
 echo "Making target tree."
 
 volume="$app"-"$version"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/i18n/en.lproj/InfoPlist.strings	Fri Jan 04 12:48:19 2019 +0000
@@ -0,0 +1,1 @@
+NSMicrophoneUsageDescription = "Sonic Visualiser needs to use the microphone for recording.";