title: AVAudioRecorder.record() always returns "false" in iOS 8
body: <p>I'm trying to create a practice app using AVAudioRecorder that, upon pressing a button, records 1 second of audio through the iPhone's mic to a file called "Test.wav" and plays it back. However, both the record() and recordForDuration() methods both seem to fail every time I try to execute them. I've already tried setting up an AVAudioSession and making it active, but nothing seems to work. Any help would be greatly appreciated.</p>
  
  <pre><code>import UIKit
  </code></pre>
  
  <p>import AVFoundation</p>
  
  <p>class ViewController: UIViewController, AVAudioRecorderDelegate {</p>
  
  <pre><code>@IBOutlet var recordAndPlayButton: UIButton!
  
  let settings = [
      AVFormatIDKey: kAudioFormatLinearPCM,
      AVSampleRateKey: 192000.0,
      AVNumberOfChannelsKey: 1,
      AVLinearPCMBitDepthKey: 16,
      AVLinearPCMIsBigEndianKey: false,
      AVLinearPCMIsFloatKey: false,
      AVLinearPCMIsNonInterleaved: false
  ]
  
  var audioSession = AVAudioSession.sharedInstance()
  var recorder : AVAudioRecorder!
  
  override func viewDidLoad() {
      audioSession.setCategory(AVAudioSessionCategoryPlayAndRecord, error: nil)
      audioSession.setActive(true, error: nil)
  
      recorder = AVAudioRecorder(URL: NSURL(fileURLWithPath: NSBundle.mainBundle().pathForResource("Test", ofType: "wav")!), settings: settings, error: nil)
      recorder.delegate = self
      super.viewDidLoad()
  }
  
  override func didReceiveMemoryWarning() {
      super.didReceiveMemoryWarning()
  }
  
  @IBAction func recordSoundAndPlay() {
      recorder.prepareToRecord()
      println(recorder.recordForDuration(1.0))
  
      var testSound = SystemSoundID()
      AudioServicesCreateSystemSoundID(NSURL(fileURLWithPath: NSBundle.mainBundle().pathForResource("Test", ofType: "wav")!), &amp;testSound)
      AudioServicesPlaySystemSound(testSound)
  }
  </code></pre>
  
  <p>}</p>