I was facing the same issue for iOS 16
do{
try AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.playback)
try AVAudioSession.sharedInstance().setActive(true)
}catch{
print("Fail to enable session")
}
Try adding the above code in viewDidLoad() or in onAppear() if using SwiftUI. It resolved my issue.