title: Swift 2 - m4a file won't play on iOS
body: <p>I'm trying to play an m4a file on an iOS device programatically. The file is downloaded from a server and stored. When the user presses a button, it is played. The file, when copied from the device to OSX does play fine. I am using the code</p>
  
  <pre><code>var player:AVAudioPlayer = AVAudioPlayer()
  
  func playAudio(sender: UIButton!) {
      let audioPath = FileUtils.getPath(audioPaths[sender.tag])
      print("PATH " + audioPath)//The printed path IS DEFINETLY correct
      do{
          player = try! AVAudioPlayer(contentsOfURL: NSURL(fileURLWithPath: audioPath))
          player.prepareToPlay()
          player.play()
      }
  }
  </code></pre>
  
  <p>The path is correct so I'm not sure why it won't work. Could it be the format (even though it plays on OSX)?</p>
  
  <p>An example file: <a href="https://www.dropbox.com/s/csewwg6n9vzan5z/131015-08%3A13%3A30.m4a?dl=0" rel="nofollow">https://www.dropbox.com/s/csewwg6n9vzan5z/131015-08%3A13%3A30.m4a?dl=0</a></p>