Starts downloading (if necessary) the specified item to the local system.
- iOS 5.0+
- macOS 10.7+
- tvOS 9.0+
- watchOS 2.0+
Specify the URL for the file or directory in the cloud that you want to download.
On input, a pointer to variable for an
NSErrorobject. If an error occurs, this pointer is set to an
NSErrorobject containing information about the error. You may specify
nilto ignore the error information.
If a cloud-based file or directory has not been downloaded yet, calling this method starts the download process. If the item exists locally, calling this method synchronizes the local copy with the version in the cloud.
For a given URL, you can determine if a file is downloaded by getting the value of the
NSMetadata key. You can also use related keys to determine the current progress in downloading the file.