diff --git a/lib/view/widgets/channel_parameters_widget.dart b/lib/view/widgets/channel_parameters_widget.dart index 81e1be353..1c1b36cfc 100644 --- a/lib/view/widgets/channel_parameters_widget.dart +++ b/lib/view/widgets/channel_parameters_widget.dart @@ -1,3 +1,6 @@ +import 'dart:io'; + +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:provider/provider.dart'; @@ -249,7 +252,9 @@ class _ChannelParametersState extends State { groupValue: oscilloscopeStateProvider.isInBuiltMICSelected, onChanged: (bool? value) async { - await Permission.microphone.request(); + if (!kIsWeb && !Platform.isMacOS) { + await Permission.microphone.request(); + } setState( () { if (value == null) { diff --git a/macos/Runner/DebugProfile.entitlements b/macos/Runner/DebugProfile.entitlements index e5e064720..3611078a0 100644 --- a/macos/Runner/DebugProfile.entitlements +++ b/macos/Runner/DebugProfile.entitlements @@ -12,5 +12,7 @@ com.apple.security.personal-information.location + com.apple.security.device.audio-input + diff --git a/macos/Runner/Info.plist b/macos/Runner/Info.plist index 7dc77d9b1..b94ff67b4 100644 --- a/macos/Runner/Info.plist +++ b/macos/Runner/Info.plist @@ -30,5 +30,7 @@ NSApplication NSLocationUsageDescription This app needs access to location. + NSMicrophoneUsageDescription + This app needs access to microphone for oscilloscope. diff --git a/macos/Runner/Release.entitlements b/macos/Runner/Release.entitlements index fef12b430..7f08a057e 100644 --- a/macos/Runner/Release.entitlements +++ b/macos/Runner/Release.entitlements @@ -8,5 +8,7 @@ com.apple.security.personal-information.location + com.apple.security.device.audio-input +