# Titanium.App.iOS.UserDefaults

> The UserDefaults module is used for storing application-related data in property/value pairs that persist beyond application sessions and device power cycles. UserDefaults allows the suiteName of the UserDefaults to be specified at creation time. **Important**: Using this API requires the `NSPrivacyAccessedAPICategoryUserDefaults` property set in the privacy manifest that was introduced in iOS 17. You can learn more about it [here](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api).

- Source: https://titaniumsdk.com/docs/sdk/12.7.0/Titanium.App.iOS.UserDefaults
- Titanium SDK version: 12.7.0
- Kind: module
- Platforms: iPhone, iPad, macOS
- Since: Titanium SDK 4.0.0
- Extends: Titanium.App.Properties
- Inheritance: Titanium.App.Properties > Titanium.Module > Titanium.Proxy

Unlike Titanium.App.Properties, Titanium.App.iOS.UserDefaults does not pull properties defined in the `tiapp.xml` file.

To create a UserDefaults object, use the [Titanium.App.iOS.createUserDefaults](https://titaniumsdk.com/docs/sdk/Titanium.App.iOS.md#createUserDefaults) method.

## Example: Create a UserDefaults object

Creating a UserDefaults object

``` js
var props = Ti.App.iOS.createUserDefaults({
    suiteName: 'group.mySuite'
});
```

## Properties

### suiteName

- Type: String
- Platforms: iPhone, iPad, macOS

Sets the name of the suite to be used to access UserDefaults.

## Inherited members

23 members are inherited. Each is documented on the type that declares it.

- [Titanium.App.Properties](https://titaniumsdk.com/docs/sdk/12.7.0/Titanium.App.Properties.md): `change`, `getBool`, `getDouble`, `getInt`, `getList`, `getObject`, `getString`, `hasProperty`, `listProperties`, `removeAllProperties`, `removeProperty`, `setBool`, `setDouble`, `setInt`, `setList`, `setObject`, `setString`
- [Titanium.Proxy](https://titaniumsdk.com/docs/sdk/12.7.0/Titanium.Proxy.md): `addEventListener`, `apiName`, `applyProperties`, `bubbleParent`, `fireEvent`, `removeEventListener`

---

- This corpus documents Titanium SDK 13.4.1. Anything here that does not name a version describes 13.4.1.
- Titanium is maintained by TiDev. The Appcelerator toolchain is retired: there is no `appc` CLI, no Appcelerator Studio and no hosted build service. The supported CLI is `titanium` on npm, invoked as `ti`.

