not sure if it has to be in .wav format or not, but i have some code for this give me a sec.
//EDIT
import UIKit
import AVFoundation
class ViewController: UIViewController {
var AudioPlayer = AVAudioPlayer()
override func viewDidLoad() {
super.viewDidLoad()
let AssortedMusics = NSURL(fileURLWithPath: NSBundle.mainBundle().pathForResource("bensound-november", ofType: "mp3")!)
AudioPlayer = try! AVAudioPlayer(contentsOfURL: AssortedMusics)
AudioPlayer.prepareToPlay()
AudioPlayer.numberOfLoops = -1
AudioPlayer.play()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
}
that should work, and it should be looped aswell, since if make number of loops = -1, thats the effect it has for some reason i don't understand, so i won't explain it.
hope that helps!