title: Audio playback lock screen controls not displaying on iPhone
body: <p>I am testing this using iOS 10.2 on my actual iPhone 6s device. </p>
  
  <p>I am playing streamed audio and am able to play/pause audio, skip tracks, etc. I also have enabled background modes and the audio plays in the background and continues through a playlist properly. The only issue I am having is getting the lock screen controls to show up. Nothing displays at all...</p>
  
  <p>In viewDidLoad() of my MainViewController, right when my app launches, I call this...</p>
  
  <pre><code> func setupAudioSession(){
  
     UIApplication.shared.beginReceivingRemoteControlEvents()
  
  
     do {
         try    AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback, with: AVAudioSessionCategoryOptions.mixWithOthers)
  
         self.becomeFirstResponder()
  
         do {
             try AVAudioSession.sharedInstance().setActive(true)
                     print("AVAudioSession is Active")
         } catch let error as NSError {
                     print(error.localizedDescription)
  
         }
     } catch let error as NSError {
                 print(error.localizedDescription)
     }
  }
  </code></pre>
  
  <p>and then in my AudioPlayer class after I begin playing audio I call ...</p>
  
  <pre><code>func setupLockScreen(){
         let commandCenter = MPRemoteCommandCenter.shared()
         commandCenter.nextTrackCommand.isEnabled = true
         commandCenter.nextTrackCommand.addTarget(self, action:#selector(skipTrack))
         MPNowPlayingInfoCenter.default().nowPlayingInfo = [MPMediaItemPropertyTitle: "TESTING"]
  }
  </code></pre>
  
  <p>When I lock my iPhone and then tap the power button again to go to the lock screen, the audio controls are not displayed at all. It is as if no audio is playing, I just see my normal background photo. Also no controls are displayed in the control panel (swiping up on home screen and then swiping left to where the music controls should be). </p>
  
  <p>Is the issue because I am not using AVAudioPlayer or AVPlayer? But then how does, for example, Spotify get the lock screen controls to display using their own custom audio player? Thanks for any advice / help </p>