An ordered list of assets or collections returned from a Photos fetch method.
- iOS 8.0+
- macOS 10.13+
- tvOS 10.0+
When you use class methods on the
PHCollection classes to retrieve objects, Photos provides the resulting objects in a fetch result. You access the contents of a fetch result with the same methods and conventions used by the
NSArray class. Unlike an
NSArray object, however, a
PHFetch object dynamically loads its contents from the Photos library as needed, providing optimal performance even when handling a large number of results.
A fetch result provides thread-safe access to its contents. After a fetch, the fetch result’s
count value is constant, and all objects in the fetch result keep the same
local value. (To get updated content for a fetch, register a change observer with the shared
A fetch result caches its contents, keeping a batch of objects around the most recently accessed index. Because objects outside of the batch are no longer cached, accessing these objects results in refetching those objects. This process can result in changes to values previously read from those objects.