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...
AVAudioSession* session = [AVAudioSession sharedInstance];
session.delegate = self; // Which is what is automatically generated by the template.
...generates the following warning...
"delegate deprecated: first deprecated in iOS 6"
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."
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?
The error you are running into is in this block of code
AVAudioSession* session = [AVAudioSession sharedInstance];
session.delegate = self;// <-------- DEPRECATED IN IOS 6.0
To silence the warning change those 2 lines to this:
[[AVAudioSession sharedInstance] setActive:YES error:nil];
Hope this helps.