Ne peut pas beginReceivingRemoteControlEvents dans iOS

Dans mon application, je veux permettre à l'utilisateur de contrôler la lecture audio en arrière-plan. Je fond ensemble les modes .plist, et en joue en bg comme je le voulais.Mais je ne peux pas obtenir aucune réponse de toucher les boutons de contrôle.

J'ai mis le AudioSession comme ce

[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayback error:nil];
[[AVAudioSession sharedInstance]setActive:YES error:nil];

Puis, dans viewContoller où mon joueur est placé je beginReceivingRemoteControlEvents comme ce

 if ([[UIApplication sharedApplication] respondsToSelector:@selector(beginReceivingRemoteControlEvents)]){
    [[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
    [[UIApplication sharedApplication] beginBackgroundTaskWithExpirationHandler:NULL];
    [self becomeFirstResponder];
    NSLog(@"Responds!");
}

Et il imprime Responds!

Mais le problème est que cette méthode n'est jamais appelé

    - (void)remoteControlReceivedWithEvent:(UIEvent *)event
{
    NSLog(@"Where is my event?");
    if(event.type == UIEventTypeRemoteControl)
    {
        switch (event.subtype) {
            case UIEventSubtypeRemoteControlTogglePlayPause:
                NSLog(@"Pause");
                [self playWords:playButton];
                break;
            case UIEventSubtypeRemoteControlNextTrack:
                NSLog(@"Next");
                [self next];
                break;
            case UIEventSubtypeRemoteControlPreviousTrack:
                NSLog(@"Prev");
                [self prev];
                break;

        }
    }

J'ai même essayé d'écrire une catégorie sur UIApplication de le laisser devenir le premier intervenant, mais il n'aide pas

@implementation UIApplication (RemoteEvents)
-(BOOL)canBecomeFirstResponder
{
    return YES;
}
@end

Pourquoi cela peut-il arriver?

SOLUTION
Voici ce qui a résolu mon problème La saisie de fond sur iOS4 pour la lecture audio

OriginalL'auteur Nikita Pestrov | 2012-04-23