---
title: Settings
framework: foundation
role: collectionGroup
role_heading: API Collection
path: foundation/settings
---

# Settings

Configure your app using data you store persistently on the local disk or in iCloud.

## Overview

Overview Settings are small pieces of data that you use to configure your app’s interface and behavior. Instead of recompiling your code every time you want to make a change, your code uses settings to alter your app’s configuration dynamically. Typically, you use this kind of data to reflect the personal preferences of the person using your app. For example, a drawing app might store whether someone prefers inches or centimeters for distance measurements. However, you can also use settings to manage internal behaviors, such as the amount of data your app logs during testing. The system stores each app’s settings persistently to disk, so that they are available between launches. You typically store strings, numbers, and other simple data types to disk, but you can store more complex types as needed. The  UserDefaults type manages settings for your app on the current device, and doesn’t share those settings with the person’s other devices. To share settings with instances of your app running on all of the person’s devices, place them in iCloud using the NSUbiquitousKeyValueStore type.

## Topics

### App-specific settings

- [Accessing settings from your code](foundation/accessing-settings-from-your-code.md)
- [UserDefaults](foundation/userdefaults.md)

### Settings interfaces

- [Adding a settings interface to your app](foundation/adding-a-settings-interface-to-your-app.md)
- [Building a Settings bundle for your app](foundation/building-a-settings-bundle-for-your-app.md)

### iCloud key and value storage

- [NSUbiquitousKeyValueStore](foundation/nsubiquitouskeyvaluestore.md)

## See Also

### Files and Data Persistence

- [File System](foundation/file-system.md)
- [Archives and Serialization](foundation/archives-and-serialization.md)
- [Spotlight](foundation/spotlight.md)
- [iCloud](foundation/icloud.md)
- [Optimizing Your App’s Data for iCloud Backup](foundation/optimizing-your-app-s-data-for-icloud-backup.md)
