트랙을 재생 한 다음 배경으로 이동할 때마다 이러한 알림 중 하나가 내 앱에서 실행되지 않습니다. 아무도 왜 또는 어떻게 알 수 있습니까?MPMusicPlayerControllerPlaybackStateDidChangeNotification 백그라운드에서
self.player = [MPMusicPlayerController applicationMusicPlayer];
[self.player beginGeneratingPlaybackNotifications];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handlePlaybackStateChanged:) name:MPMusicPlayerControllerPlaybackStateDidChangeNotification object:self.player ];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleItemChanged:) name:MPMusicPlayerControllerNowPlayingItemDidChangeNotification object:self.player ];
를 참조 배경 오디오 모드를 활성화 ** (프로젝트 설정> 기능> 배경 모드> 오디오 및 AirPlay를) ** –