Platforms to show: All Mac Windows Linux Cross-Platform

Back to PHChangeMBS class.

PHChangeMBS.changeDetailsForFetchResult(FetchResult as PHFetchResultMBS) as PHFetchResultChangeDetailsMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns detailed change information for a fetch result.

object: A fetch result.

Returns a change details object, or nil if there have been no changes affecting the fetch result’s contents.

When Photos calls your change observer’s photoLibraryDidChange method, call the changeDetailsForObject method to get detailed change information about the results of a fetch you’ve previously performed. If there have been any changes in the Photos library affecting the fetch, the resulting PHFetchResultChangeDetailsMBS object tells you if any contents in the fetch result have been added, removed, or changed since you fetched it. If there have been no changes since you performed the fetch, this method returns nil.

Typically, if your app displays the members of a collection (such as an album or moment), you use a method such as fetchAssetsInAssetCollection to retrieve those members and then keep the resulting PHFetchResultMBS object. You can then pass that fetch result to this method to learn about changes to the collection, such as whether new members have been added to it (and which indexes to insert them at in your UI).

To find out about changes to an object’s properties, such as a collection’s title or an asset’s metadata, use the changeDetailsForObject: method.

PHChangeMBS.changeDetailsForObject(PHObject as PHObjectMBS) as PHObjectChangeDetailsMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns detailed change information for the specified asset or collection.

object: A PHAssetMBS, PHAssetCollectionMBS, or PHCollectionListMBS object.

Returns 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 the changeDetailsForObject 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 PHObjectChangeDetailsMBS 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 PHObjectChangeDetailsMBS object it returns describe changes only to the collection’s properties. If you are instead interested in changes to the collection’s membership, use the changeDetailsForFetchResult method.

PHChangeMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The constructor.

The items on this page are in the following plugins: MBS Mac64bit Plugin.


The biggest plugin in space...