title: Can't record on iPad: Error Domain=NSOSStatusErrorDomain Code=1718449215 "(null)"
body: <p>I am running on iPad iOS 9.3.4 (latest version as of this writing).</p>
  
  <p>I am running this code:</p>
  
  <pre><code>let settings = [
          AVFormatIDKey: NSNumber(unsignedInt: kAudioFormatMPEG4AAC),
          AVSampleRateKey: 44100.0,
          AVNumberOfChannelsKey: 2 as NSNumber,
          AVEncoderAudioQualityKey: AVAudioQuality.High.rawValue
      ]
  
  
  do {
      audioRecorder = try AVAudioRecorder(URL: audioURL, settings: settings)
      audioRecorder.delegate = self
      audioRecorder.record()
  
  } catch let error as NSError{
    print(error.description)
  }
  </code></pre>
  
  <p>I am catching this error:</p>
  
  <blockquote>
    <p>Error Domain=NSOSStatusErrorDomain Code=1718449215 "(null)"</p>
  </blockquote>
  
  <p>When I try to use AVAudioRecorder with Objective-C - I am able to record with no problems. The problem seems to only occur with Swift and only on a device - no issue in simulator.</p>
  
  <p>If I switch out kAudioFormatMPEG4AAC with kAudioFormatLinearPCM, I am able to record - but when I try to play back the recording nothing plays - seems like it hasn't recorded well.</p>
  
  <p>Has anyone been able to record with AVAudioRecorder in Swift lately and have the recording play back on a real iPad? I would like to just have that code.</p>