Class

PHChange

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

Declaration

@interface PHChange : NSObject

Overview

Photos provides PHChange objects to notify your app of changes to the assets and collections managed by the Photos app. To receive change information, adopt the PHPhotoLibraryChangeObserver protocol and register your observer with the shared PHPhotoLibrary object.

After Photos provides you with a change object, you use its methods to get a change details object. Call the changeDetailsForObject: or changeDetailsForFetchResult: method, passing an asset or collection object you’ve previously fetched or a fetch result containing several such objects. The resulting PHObjectChangeDetails or PHFetchResultChangeDetails object describes any changes that have happened to the object or fetch result since you last fetched it.

Topics

Getting Change Details

- changeDetailsForObject:

Returns detailed change information for the specified asset or collection.

- changeDetailsForFetchResult:

Returns detailed change information for a fetch result.

Relationships

Inherits From

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.

- registerChangeObserver:

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

- unregisterChangeObserver:

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

PHPhotoLibraryChangeObserver

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

PHObjectChangeDetails

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

PHFetchResultChangeDetails

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software