title: AVAudioSession Interruptions
body: <p>So in my app, running on iOS 6, everything seems to work fine with audio.  I use the old C API format to catch interruptions using a callback; setting up via: <code>AudioSessionInitialize(NULL, NULL, interruptionListenerCallback, (__bridge void *)self)</code> and it was great.  Using iOS 7 SDK though, it seems that my interruption callback is never called when the device receives calls or an alarm goes off.  </p>
  
  <p>After some looking around, I heard that the old C api were deprecated and that you should move to the newer AVAudioSession functions.  More reading revealed that the AVAudioSession delegate is deprecated and that you should use the <code>NSNotification</code> for <code>AVAudioSessionInterruptionNotification</code> to catch interruptions and do whatever needs to be done.</p>
  
  <p>For me, it seems that this notification is never actually fired and therefore I never get properly interrupted, which then breaks all of my audio stuff after the call ends.</p>
  
  <p>I sign up for the notification like so:</p>
  
  <pre><code>[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(AudioInterruption:) name:AVAudioSessionInterruptionNotification object:nil];
  </code></pre>
  
  <p>For now, the <code>AudioInterruption:</code> function simply logs that it got fired.  Neither the log nor any breakpoints are triggering.</p>
  
  <p>To be clear, initially audio playback and recording works fine.  When an interruption occurs (such as an incoming call or an alarm), no interruption notification is fired.  If more surrounding code is necessary, let me know.</p>