---
title: "startDownloadingUbiquitousItem(at:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/filemanager/startdownloadingubiquitousitem(at:)"
---

# startDownloadingUbiquitousItem(at:)

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

## Declaration

```swift
func startDownloadingUbiquitousItem(at url: URL) throws
```

## Parameters

- `url`: The URL for the file or directory in the cloud that you want to download.

## Discussion

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. note: In Swift, this method returns Void and is marked with the throws keyword to indicate that it throws an error in cases of failure. You call this method in a try expression and handle any errors in the catch clauses of a do statement, as described in Error Handling in The Swift Programming Language and About Imported Cocoa Error Parameters.

## See Also

### Managing iCloud-based items

- [ubiquityIdentityToken](foundation/filemanager/ubiquityidentitytoken.md)
- [url(forUbiquityContainerIdentifier:)](foundation/filemanager/url(forubiquitycontaineridentifier:).md)
- [isUbiquitousItem(at:)](foundation/filemanager/isubiquitousitem(at:).md)
- [setUbiquitous(_:itemAt:destinationURL:)](foundation/filemanager/setubiquitous(_:itemat:destinationurl:).md)
- [evictUbiquitousItem(at:)](foundation/filemanager/evictubiquitousitem(at:).md)
- [url(forPublishingUbiquitousItemAt:expiration:)](foundation/filemanager/url(forpublishingubiquitousitemat:expiration:).md)
