An MPMediaLibrary object, or media library, represents the state of the set of synced media items (such as songs) on a device. The complete library of media items itself is called the iPod library.

A user may sync their device, changing the content of the iPod library, while your application is running. You can use the notification provided by this class to ensure that your application’s cache of the iPod library is up-to-date.

Import Statement

Availability

Asks a media library to turn on notifications for device-to-computer synchronizations.

Declaration

Swift

funcbeginGeneratingLibraryChangeNotifications()

Objective-C

- (void)beginGeneratingLibraryChangeNotifications

Discussion

This method is nestable—that is, you can call it multiple times. To turn off notifications, you must call endGeneratingLibraryChangeNotifications the same number of times that you called beginGeneratingLibraryChangeNotifications.