Type Method


Returns all versions of the specified file except the current version.


+ (NSArray<NSFileVersion *> *)otherVersionsOfItemAtURL:(NSURL *)url;



The URL of the file whose versions you want.

Return Value

An array of file version objects or nil if there is no such file. The array does not contain the version object returned by the currentVersionOfItemAtURL: method.


For locally based files, this property typically contains versions of the file that you saved explicitly or that were saved at appropriate times while the file was being edited. For documents residing in the cloud, this property typically returns zero or more file versions representing conflicting versions of a file that need to be resolved with the current version.

See Also

Getting the Version of a File

+ currentVersionOfItemAtURL:

Returns the most recent version object for the file at the specified URL.

+ versionOfItemAtURL:forPersistentIdentifier:

Returns the version of the file that has the specified persistent ID.

+ temporaryDirectoryURLForNewVersionOfItemAtURL:

Creates and returns a temporary directory to use for saving the contents of the file.