Generic Instance Method


Returns detailed change information for the specified asset or collection.


func changeDetails<T>(for object: T) -> PHObjectChangeDetails<T>? where T : PHObject



Return Value

A change details object, or nil if there have been no changes to the specified asset or collection.


When Photos calls your change observer’s photoLibraryDidChange(_:) method, call this changeDetails(for:) method to get detailed change information about an asset or collection you’ve previously fetched. If the asset or collection has changed since you last fetched it, the resulting PHObjectChangeDetails object describes the changes. If there are no changes between the fetched object and the current state of the asset or collection it represents in the Photos library, this method returns nil.

For an asset collection or collection list, this method and the PHObjectChangeDetails object it returns describe only changes to the collection’s properties. If you are instead interested in changes to the collection’s membership, use the changeDetails(for:) method.

See Also

Getting Change Details