title: remoteControlReceivedWithEvent Never called
body: <p>I'm trying to allow a remote or earbuds to play and pause audio when the app is in background or the screen is locked.  So In viewDidLoad I have:</p>
  
  <pre><code>[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
  [self becomeFirstResponder];
  </code></pre>
  
  <p>I then have:</p>
  
  <pre><code>- (void) remoteControlReceivedWithEvent: (UIEvent *) receivedEvent {
  
  
  
  if (receivedEvent.type == UIEventTypeRemoteControl) {
  
  
  
  switch (receivedEvent.subtype) {
  
  
  
      case UIEventSubtypeRemoteControlTogglePlayPause:
  
          [self playOrStop];
  
          break;
  
  
  
      case UIEventSubtypeRemoteControlPreviousTrack:
  
  
          break;
  
  
  
      case UIEventSubtypeRemoteControlNextTrack:
  
  
          break;
  
  
  
      default:
  
          break;
  
  }
  
  }
  
  
  }
  </code></pre>
  
  <p>But, it never gets called.  Running in background is turned on, the AVSession is set in AppDelegate.  I'm at a loss.</p>