The solution turned out to be rather simple, I just had to add the com.apple.security.device.audio-input entitlement, the NSMicrophoneUsageDescription Info.plist key, and use AVCaptureDevice to request for permission to use the microphone. The error messages are still logged to the console, but it works.