I found it eventually but this is driving me crazy to share projects between XCode11 and XCode12. At times I need XCode12 to test new iOS14 APIs but then XCode12 beta 3 is too buggy so coming back to XCode11 is painful. There are lot of code changes required to make the project compatible with XCode11. For instance, this code
Code Block if usingFrontCamera { preferredAutoMicrophoneOrientation = AVAudioSession.Orientation.front |
} else { preferredAutoMicrophoneOrientation = AVAudioSession.Orientation.back |
} |
It requires a different approach altogether in XCode11. Setting it to AVAudioSession.Orientation.orientationFront doesn't work!