audio_session icon indicating copy to clipboard operation
audio_session copied to clipboard

Crash when setting AVAudioSessionRouteSharingPolicy for iOS

Open Fleximex opened this issue 4 years ago • 2 comments

On an iOS 14.5 simulator setting the AVAudioSessionRouteSharingPolicy will cause an exception or crash.

  • AVAudioSessionRouteSharingPolicy.defaultPolicy works fine
  • AVAudioSessionRouteSharingPolicy.longFormAudio and AVAudioSessionRouteSharingPolicy.longFormVideo cause an OSStatus error -50 platform exception*
  • AVAudioSessionRouteSharingPolicy.independent causes a Lost connection to device. from the IDE without any Flutter or system logs.

*more info: https://stackoverflow.com/questions/26718103/what-does-osstatus-error-50-mean

Fleximex avatar Sep 13 '21 14:09 Fleximex

Apple's documentation for independent says:

Apps shouldn’t try to set this value directly.

I wasn't able to get any exception on longFormAudio. Can you provide a minimal reproduction project?

ryanheise avatar Sep 14 '21 03:09 ryanheise

Any update on this or is the issue resolved?

ryanheise avatar Sep 20 '21 09:09 ryanheise