Change Audio Session Type iOS

So when playing our cocos app, and they have the phone muted and/or ringer to 0, the app makes no audio and we get 1 star because well youtube makes audio so, our app has to be broken.

To fix this we need to change the audio category from Ambient to Playback details are here Audio Session Categories and Modes

However I can’t find any API details on cocos2d-x on how to change this? How do we change audio to be on the “media” volume control not “ringer” volume control?

If you do a text search for AVAudioSessionCategory in all source files, you would see this:

\cocos\audio\apple\ (2 hits)
	Line 115:                     setCategory: AVAudioSessionCategoryAmbient
	Line 196:             BOOL success = [[AVAudioSession sharedInstance] setCategory: AVAudioSessionCategoryAmbient error: &error];

That’s in v4 of Cocos2d-x, and it may be the same in v3.xx;