iOS 上的 Flutter、flutter_sound RecordingPermissionException

nik*_*ike 5 audio-recording ios flutter

使用

颤动声音:^8.3.12

我仅在 iOS上遇到问题

扑动:FS:<---channelMethodCallHandler:openPlayerCompleted扑动:FS:<---openAudioSession [VERBOSE-2:ui_dart_state.cc(199)]未处理的异常:“RecordingPermissionException”的实例#0 RecorderExampleState.openTheRecorder(包:projectName/控制器/audioRecorder.dart:46:9)

我还添加到 info.plist:

<key>NSMicrophoneUsageDescription</key>
<string>Allow the app to record using your phone's microphone in order to record description for the new parts</string>
<key>UIBackgroundModes</key>
<array>
    <string>audio</string>
</array>
Run Code Online (Sandbox Code Playgroud)