Instance Method


Registers an object to receive messages when objects in the photo library change.


func register(_ observer: PHPhotoLibraryChangeObserver)



An object for receiving change messages.


You implicitly declare interest in change messages whenever you use a fetch method (such as fetchAssets(with:)) to retrieve assets or collections. After you perform a fetch, Photos automatically sends change messages whenever the objects in the resulting fetch request change—including when changes happen that add to, remove from, or reorder the list of objects in the fetch result.

See Also

Observing Changes to the Photo Library

Observing Changes in the Photo Library

Register an observer to be notified of changes to the photo library.

func unregisterChangeObserver(PHPhotoLibraryChangeObserver)

Unregisters an object so that it no longer receives change messages.

protocol PHPhotoLibraryChangeObserver

A protocol you can implement to be notified of changes that occur in the photo library.

class PHChange

A description of a change that occurred in the photo library.

class PHObjectChangeDetails

A description of changes that occurred in an asset or collection object.

class PHFetchResultChangeDetails

A description of changes that occurred in the set of asset or collection objects listed in a fetch result.