title: Cocos2D 2.1: "Delegate" deprecated in iOS 6. How do I set the delegate for this AVAudioSession?
body: <p>Started a Cocos2D 2.1 template (with no physics engine) in Xcode 4.5, targeted for iOS 6 and iPad.  In the CDAudioManager.m file, the following code...</p>
  
  <pre><code>AVAudioSession* session = [AVAudioSession sharedInstance];
  session.delegate = self;  // Which is what is automatically generated by the template.
  </code></pre>
  
  <p>...generates the following warning...</p>
  
  <pre><code>"delegate deprecated:  first deprecated in iOS 6"
  </code></pre>
  
  <p>So I go to the apple developer documentation, and it says under "delegate," "Deprecated in iOS 6.0. Use the notifications described in the Notifications section of this class instead."</p>
  
  <p><a href="http://developer.apple.com/library/ios/#documentation/AVFoundation/Reference/AVAudioSession_ClassReference/DeprecationAppendix/AppendixADeprecatedAPI.html#//apple_ref/occ/instp/AVAudioSession/delegate" rel="noreferrer">http://developer.apple.com/library/ios/#documentation/AVFoundation/Reference/AVAudioSession_ClassReference/DeprecationAppendix/AppendixADeprecatedAPI.html#//apple_ref/occ/instp/AVAudioSession/delegate</a></p>
  
  <p>Problem is, it looks to me like all we're trying to do--forgive my inexperience--is set the delegate for the AVAudioSession to the CDAudioManager instance itself.  How do the notifications accomplish this?  Or am I just wrong about the goal of the above code?</p>