The AppStore version of my app works perfectly fine. But the moment I build the same code with XCode 13, AVAssetWriter fails with errors at the very beginning itself both on iOS 14 and iOS 15. This happens with Multicam session only.
Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-12780)
I am wondering what could be wrong. I even passed default settings to AVAssetWriter (the recommended ones).
Update: It turned out to be an issue with audio settings.