Just trying to run my app in Xcode 12 on Catlina 10.15.5 and wondered if anyone else can reproduce this issue before I file a bug report.
My app builds and runs on a device just fine, and also builds and runs on device/simulator in Xcode 11 but if I try and run the app in the Xcode 12 simulator (I've tried several simulators) it hangs as soon as I try and call .prepareToPlay() or .play() on a valid instance of AVAudioPlayer.
Just to rule out any quirks of my app code, I've dropped in some code directly into the top of my Scene delegate:
This is enough to trigger the hang - if I hit pause in the debugger I can see it's hanging on a mutex wait on the main thread in the prepareToPlay method call.
I seem to be able to reproduce this with SwiftUI live previews as well.
My app builds and runs on a device just fine, and also builds and runs on device/simulator in Xcode 11 but if I try and run the app in the Xcode 12 simulator (I've tried several simulators) it hangs as soon as I try and call .prepareToPlay() or .play() on a valid instance of AVAudioPlayer.
Just to rule out any quirks of my app code, I've dropped in some code directly into the top of my Scene delegate:
Code Block let audioPlayer = try! AVAudioPlayer(contentsOf: AudioEffects.beepSoundEffectURL) audioPlayer.prepareToPlay() audioPlayer.play()
This is enough to trigger the hang - if I hit pause in the debugger I can see it's hanging on a mutex wait on the main thread in the prepareToPlay method call.
I seem to be able to reproduce this with SwiftUI live previews as well.