I used
UInt32 doSetProperty = 0;
OSStatus status1 = AudioSessionSetProperty (kAudioSessionProperty_OverrideCategoryMixWithOthers, sizeof(doSetProperty), &doSetProperty);
I saw that it become deprecated and I changed it with:
NSError *setCategoryError = nil;
if (![[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback
withOptions:AVAudioSessionCategoryOptionMixWithOthers
error:&setCategoryError]) {
// handle error
}
After doing that, the remoteControlReceivedWithEvent
is not called any longer.
In both version I did:
success &= [[AVAudioSession sharedInstance] setActive:YES error:&error];
Did anyone encounter this kind of problem?