My application uses iPodMusicPlayer, and when it is paused, the user can exit and make changes to the Apple Music application, for example, create or modify a playlist, and then return to their application.
I get the expected MPMediaLibraryDidChangeNotification, and that's fine, and I'm updating my links, etc., but I get a second MPMediaLibraryDidChangeNotification message after about 2 minutes, which I really don't need.
Any ideas on avoiding this second notice?
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(notification_iPodLibraryDidChange:) name: MPMediaLibraryDidChangeNotification object:nil];
[[MPMediaLibrary defaultMediaLibrary] beginGeneratingLibraryChangeNotifications];
source
share