Contents

startDownloadingUbiquitousItem(at:)

Starts downloading (if necessary) the specified item to the local system.

Declaration

func startDownloadingUbiquitousItem(at url: URL) throws

Parameters

  • url:

    The URL for the file or directory in the cloud that you want to download.

Discussion

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 NSMetadataUbiquitousItemDownloadingStatusKey key. You can also use related keys to determine the current progress in downloading the file.

See Also

Managing iCloud-based items