`try AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.playAndRecord) try AVAudioSession.sharedInstance().overrideOutputAudioPort(.speaker)
That doesn't work. The background music still comes from the headphones.
`try AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.playAndRecord) try AVAudioSession.sharedInstance().overrideOutputAudioPort(.speaker)
That doesn't work. The background music still comes from the headphones.