Running into the same issue. For me, it works fine in preview and in simulator, but I'm getting oscillating track volume. Attaching code for reference
let exerciseTrackPath = Bundle.main.path(forResource: "vivaldi_winter", ofType: "mp3")
var audioPlayer: AVAudioPlayer = AVAudioPlayer()
...
self.audioPlayer = try! AVAudioPlayer(contentsOf: URL(fileURLWithPath: exerciseTrackPath!))
...
audioPlayer.play()