title: AVAudioSession setCategory availability in Swift 4.2
body: <p>After migrating to <strong>Swift 4.2</strong>, I am getting multiple errors, one of which is weird. It seems like a bug in <strong>Xcode 10</strong>, but is there a workaround available?</p>
  
  <pre><code>do {
      try AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.playAndRecord, with: options)
  } catch {
      NSLog("Could not set audio session category")
  }
  </code></pre>
  
  <blockquote>
    <p>****  'setCategory(_:with:)' is unavailable in Swift</p>
  </blockquote>