<!--
{
  "documentType" : "article",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/icloud",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "iCloud"
}
-->

# iCloud

Manage files and key-value data that automatically synchronize among a user’s iCloud devices.

## Topics

### iCloud Storage

[`FileManager`](/documentation/Foundation/FileManager)

A convenient interface to the contents of the file system, and the primary means of interacting with it.

[`FileManagerDelegate`](/documentation/Foundation/FileManagerDelegate)

The interface a file manager’s delegate uses to intervene during operations or if an error occurs.

### App Preferences

[Synchronizing App Preferences with iCloud](/documentation/Foundation/synchronizing-app-preferences-with-icloud)

Store app preferences in iCloud and share them among instances of your app running on a user’s connected devices.

[`NSUbiquitousKeyValueStore`](/documentation/Foundation/NSUbiquitousKeyValueStore)

An iCloud-based container of key-value pairs you share among instances of your app
running on a person’s devices.

### File Search

[`NSMetadataQuery`](/documentation/Foundation/NSMetadataQuery)

A query that you perform against Spotlight metadata.

[`NSMetadataQueryDelegate`](/documentation/Foundation/NSMetadataQueryDelegate)

An interface that enables the delegate of a metadata query to provide substitute results or attributes.

[`NSMetadataItem`](/documentation/Foundation/NSMetadataItem)

The metadata associated with a file.

### Entitlements

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.icloud-container-development-container-identifiers>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.icloud-container-environment>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.icloud-container-identifiers>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.icloud-services>

  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.ubiquity-kvstore-identifier>

### Errors

[iCloud Error Codes](/documentation/Foundation/icloud-error-codes)

Error codes to expect when an iCloud-related error occurs.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)