Xcode Playgrounds crashes upon microphone access

Sorry if this is a dumb question. I’m still a beginner. I created an Xcode Playground app with Microphone and Speech Recognition capabilities enabled, along with a backup Info.plist. However, when running the app on Mac Catalyst, a real device, or the iOS and iPadOS simulators, it crashes right after the Speech Recognition permission popup and again after the Microphone permission popup.

For extra context, the app initially worked fine in the Swift Playgrounds app, but that environment uses an outdated SDK, so it no longer supports some of the features I’ve implemented.

I’m also struggling to find clear, beginner-friendly documentation that explains how AVAudioEngine works, which is making it hard to understand what’s going wrong and how to debug it.

Xcode Playgrounds crashes upon microphone access
 
 
Q