---
title: Deciding whether CloudKit is right for your app
framework: cloudkit
role: article
role_heading: Article
path: cloudkit/deciding-whether-cloudkit-is-right-for-your-app
---

# Deciding whether CloudKit is right for your app

Explore the various options you have for using iCloud to store and sync your app’s data.

## Overview

Overview Use iCloud to store your app’s data and make that data available on the web and on each device a person owns. iCloud provides a number of options for storing app data, where each option provides a different set of features and a varying amount of control over that data. Some options are easier to implement than others, so it’s important that you carefully consider each one and its suitability for your app before choosing CloudKit. Store documents, images, and other file types in iCloud If your app creates files such as documents and images, and you want those files to sync across a person’s devices, use iCloud Documents. You decide which files to sync by storing them in your app’s ubiquity container, and iCloud manages the persistence and synchronization of those files for you. For more information, see url(forUbiquityContainerIdentifier:) and Configuring iCloud services. In addition, the device’s owner can use iCloud Backup to store a snapshot of their device, including files that your app creates. That person can then restore an existing or new device from that snapshot. Even though your app isn’t explicitly participating in the system backup process, any files your app creates contribute to the backup’s overall size, and large backups may lead to longer restore times. If your app has files that the system doesn’t need to back up, such as temporary or cached files, use the available APIs to indicate to the system that it can ignore them. For more information, see Optimizing Your App’s Data for iCloud Backup. Sync preferences and other key-value pairs using iCloud If your app maintains a set of feature flags or other lightweight configuration, or enables someone to customize the app’s look and feel, you may want to synchronize that state across a person’s devices to create a rich and consistent experience. Using iCloud key-value storage, your app can store a maximum of 1,024 string keys, with associated data, and iCloud automatically keeps those key-value pairs in sync. Key-value storage supports only numeric types, as well as Bool, String, Date, Data, Array, and Dictionary. For more information, see NSUbiquitousKeyValueStore. Store model objects in CloudKit If your app manages a complex graph of model objects, which may include relationships between those objects, use one of the options in the following table:  |   |   |

## See Also

### Essentials

- [Enabling CloudKit in Your App](cloudkit/enabling-cloudkit-in-your-app.md)
