I've recently updated to 16.2 beta 4 and now I can't use the AVAudioRecorder at all. Calling the .record() function always returns false. There's nothing wrong when calling .prepareToPlay() or when setting the AVAudioSession's category to .record.
What's more, if I start a screen recording, with the mic enabled, and then make my way up to the point where the recorder is initialized, it'll work. Any other case, like disabling the mic for the screen recording, or starting the screen recording AFTER the recorder was initialized, will not work again. Has anyone run into this so far?
Found the issue. I was initializing the AVAudioRecorder BEFORE switching the AVAudioSession category to .record. At least as of 16.2 beta 4, you now have to initialize it AFTER setting the record category. All fine with me, it's probably the recommended approach, but an error reason would be nice when .record() returns false, I'd been at this for 7 hours total before I finally got it.