<!--
{
  "documentType" : "article",
  "framework" : "Technotes",
  "identifier" : "/documentation/Technotes/tn3183-adding-required-reason-api-entries-to-your-privacy-manifest",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "TN3183: Adding required reason API entries to your privacy manifest"
}
-->

# TN3183: Adding required reason API entries to your privacy manifest

Declare the APIs that can potentially fingerprint devices in your app or third-party SDK in a privacy manifest.

## Overview

When you build an app or third-party SDK that uses any required reason API, perform these steps in
your privacy manifest (`PrivacyInfo.xcprivacy`):

1. Add the `NSPrivacyAccessedAPITypes` key and set its value to the dictionary.
2. For each required reason API your app or third-party SDK uses, add a dictionary as a value for the `NSPrivacyAccessedAPITypes` key.
   The dictionary includes the category of the reason API and a list of reasons for using this API.
   For more information, see [Add an accessed API type and reasons dictionary](/documentation/Technotes/tn3183-adding-required-reason-api-entries-to-your-privacy-manifest#Add-an-accessed-API-type-and-reasons-dictionary).

See [](doc://com.apple.documentation/documentation/BundleResources/privacy-manifest-files) and [](doc://com.apple.documentation/documentation/BundleResources/describing-use-of-required-reason-api) for more information about the privacy manifest and these keys.

This document describes how to add the `NSPrivacyAccessedAPIType`, `NSPrivacyAccessedAPITypeReasons`,
and `NSPrivacyAccessedAPITypes` keys to your privacy manifest in Xcode. If you work outside of Xcode,
review this document to learn about the expected structure of each key.

> Note: Before you start adding the keys to your privacy manifest, enable raw keys and values in
> Xcode to view the raw keys and hide their human-readable names. Click anywhere in the privacy manifest,
> then choose Xcode > Editor > Raw Keys and Values. Repeat the process to disable this feature.

## Select an accessed API category

A privacy accessed API category identifies the category of required reason APIs your app or third-party
SDK uses. Set the value of the `NSPrivacyAccessedAPIType` key to a privacy accessed API category. For
more information, see [](doc://com.apple.documentation/documentation/BundleResources/describing-use-of-required-reason-api).

The possible values of a privacy accessed API category are:

- `NSPrivacyAccessedAPICategoryActiveKeyboards`
- `NSPrivacyAccessedAPICategoryDiskSpace`
- `NSPrivacyAccessedAPICategoryFileTimestamp`
- `NSPrivacyAccessedAPICategorySystemBootTime`
- `NSPrivacyAccessedAPICategoryUserDefaults`

## Add an accessed API type key

The `NSPrivacyAccessedAPIType` key uses the following format:

```xml
<key>NSPrivacyAccessedAPIType</key>
<string>NS_PRIVACY_ACCESSED_API_CATEGORY_VALUE</string>
```

The `NS_PRIVACY_ACCESSED_API_CATEGORY_VALUE` string represents a privacy accessed API category.
For more information, see [Select an accessed API category](/documentation/Technotes/tn3183-adding-required-reason-api-entries-to-your-privacy-manifest#Select-an-accessed-API-category).

To add the `NSPrivacyAccessedAPIType` key to a privacy accessed API type and reasons dictionary:

1. Select the dictionary in the property list editor.
2. Click the disclosure triangle to the left of the dictionary to reveal it.
3. Click the Add button (+) beside the dictionary to add a new item.
4. In the pop-up menu that appears, choose `NSPrivacyAccessedAPIType`.
5. Confirm the value is `String` in the Type column.
6. Select a privacy accessed API category from the pop-up menu in the Value column. For possible values, see [Select an accessed API category](/documentation/Technotes/tn3183-adding-required-reason-api-entries-to-your-privacy-manifest#Select-an-accessed-API-category).
7. Confirm that the value exactly matches the category of required reason API that your app or third-party SDK uses.

## Add an accessed API type reasons key

The `NSPrivacyAccessedAPITypeReasons` key uses the following format:

```xml
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
    <string>NS_PRIVACY_ACCESSED_API_TYPE_REASON_VALUE</string>
    ...
</array>
```

Each `NS_PRIVACY_ACCESSED_API_TYPE_REASON_VALUE` string in the array identifies a reason why your app
or third-party SDK uses a required reason API. All the values in the array are associated with a
`NSPrivacyAccessedAPIType` key you provide when you create a privacy accessed API type and reasons dictionary.

To add the `NSPrivacyAccessedAPITypeReasons` key to a privacy accessed API type and reasons dictionary:

1. Select the dictionary in the property list editor.
2. Click the disclosure triangle to the left of the dictionary to reveal it.
3. Confirm the dictionary contains a `NSPrivacyAccessedAPIType` key with a value as described in [Select an accessed API category](/documentation/Technotes/tn3183-adding-required-reason-api-entries-to-your-privacy-manifest#Select-an-accessed-API-category).
4. Click the Add button (+) beside the dictionary to add a new item.
5. In the pop-up menu that appears, choose `NSPrivacyAccessedAPITypeReasons`.
6. Confirm the value is `Array` in the Type column.
7. Click the disclosure triangle to the left of `NSPrivacyAccessedAPITypeReasons` to reveal it.
8. Click the Add button (+) beside `NSPrivacyAccessedAPITypeReasons` to add a reason.
9. Choose a reason from the pop-up menu in the Value column. For possible values, see [](doc://com.apple.documentation/documentation/BundleResources/describing-use-of-required-reason-api).
10. Confirm that the value exactly matches a reason for the `NSPrivacyAccessedAPIType` key you use in step 3.

## Add an accessed API type and reasons dictionary

A privacy accessed API type and reasons dictionary includes a category of required reason APIs and a
list of related reasons. The dictionary contains exactly two keys: `NSPrivacyAccessedAPIType` and
`NSPrivacyAccessedAPITypeReasons`. It uses the following format:

```xml
<dict>
    <!— Add an accessed API type key. -->
    <key>NSPrivacyAccessedAPIType</key>
    <string>NS_PRIVACY_ACCESSED_API_CATEGORY_VALUE</string>

    <!— Add an accessed API type reasons key. -->
    <key>NSPrivacyAccessedAPITypeReasons</key>
    <array>
        <string>NS_PRIVACY_ACCESSED_API_TYPE_REASON_VALUE</string>
        ...
    </array>
</dict>
```

To add a privacy accessed API type and reasons dictionary to the `NSPrivacyAccessedAPITypes` key in your privacy manifest:

1. Select `PrivacyInfo.xcprivacy` in the Project navigator.
2. Find the `NSPrivacyAccessedAPITypes` key in the property list editor.
3. Click the disclosure triangle to the left of `NSPrivacyAccessedAPITypes` to reveal it.
4. Click the Add button (+) beside `NSPrivacyAccessedAPITypes` to insert a new item.
5. Confirm the value is `Dictionary` in the Type column.
6. To add the `NSPrivacyAccessedAPIType` key to the dictionary, see [Add an accessed API type key](/documentation/Technotes/tn3183-adding-required-reason-api-entries-to-your-privacy-manifest#Add-an-accessed-API-type-key).
7. To add the `NSPrivacyAccessedAPITypeReasons` key to the dictionary, see [Add an accessed API type reasons key](/documentation/Technotes/tn3183-adding-required-reason-api-entries-to-your-privacy-manifest#Add-an-accessed-API-type-reasons-key).

## Add the accessed API types key

The `NSPrivacyAccessedAPITypes` key is an array of privacy accessed API type and reasons dictionaries.
For more information, see [Add an accessed API type and reasons dictionary](/documentation/Technotes/tn3183-adding-required-reason-api-entries-to-your-privacy-manifest#Add-an-accessed-API-type-and-reasons-dictionary).
The key uses the following format:

```xml
<key>NSPrivacyAccessedAPITypes</key>
<array>
    <dict>
        <key>NSPrivacyAccessedAPIType</key>
        <string>NS_PRIVACY_ACCESSED_API_CATEGORY_VALUE</string>
        <key>NSPrivacyAccessedAPITypeReasons</key>
        <array>
            <string>NS_PRIVACY_ACCESSED_API_TYPE_REASON_VALUE</string>
            ...
        </array>
    </dict>
    ...
</array>
```

To add the `NSPrivacyAccessedAPITypes` key to your privacy manifest:

1. Select `PrivacyInfo.xcprivacy` in the Project navigator.
2. Click the Add button (+) beside the `App Privacy Configuration` key in the property list editor.
3. In the pop-up menu that appears, choose `NSPrivacyAccessedAPITypes`.
4. Confirm the value is `Array` in the Type column.
5. To add a privacy accessed API type and reasons dictionary to the array, see [Add an accessed API type and reasons dictionary](/documentation/Technotes/tn3183-adding-required-reason-api-entries-to-your-privacy-manifest#Add-an-accessed-API-type-and-reasons-dictionary).

The following example declares disk space required reason API usage in an app named `Sample`:

**Source code:**

```xml
<plist>
<dict>
    <key>NSPrivacyAccessedAPITypes</key>
    <array>
        <!-- Declares disk space required reason API in the `Sample` app. -->
        <dict>
            <key>NSPrivacyAccessedAPIType</key>
            <string>NSPrivacyAccessedAPICategoryDiskSpace</string>
            <key>NSPrivacyAccessedAPITypeReasons</key>
            <array>
                <string>B728.1</string>
                <string>E174.1</string>
            </array>
        </dict>
    </array>
</dict>
</plist>
```

**Property list:**

![A privacy manifest that declares disk space required reason API usage.](images/com.apple.technotes/tn3183-required_reason_api_entry@2x.png)

Repeat step 5 for each additional required reason API your app or third-party SDK uses. The
example below additionally declares user defaults required reason API usage in `Sample`:

**Source code:**

```xml
<plist>
<dict>
    <key>NSPrivacyAccessedAPITypes</key>
    <array>
        <!-- Declares disk space required reason API in the `Sample` app. -->
        <dict>
            <key>NSPrivacyAccessedAPIType</key>
            <string>NSPrivacyAccessedAPICategoryDiskSpace</string>
            <key>NSPrivacyAccessedAPITypeReasons</key>
            <array>
                <string>B728.1</string>
                <string>E174.1</string>
            </array>
        </dict>
        <!-- Declares user defaults required reason APIs in the `Sample` app. -->
        <dict>
            <key>NSPrivacyAccessedAPIType</key>
            <string>NSPrivacyAccessedAPICategoryUserDefaults</string>
            <key>NSPrivacyAccessedAPITypeReasons</key>
            <array>
                <string>CA92.1</string>
            </array>
        </dict>
    </array>
</dict>
</plist>
```

**Property list:**

![A privacy manifest that declares disk space and user defaults required reason APIs usage.](images/com.apple.technotes/tn3183-required_reason_api_entries@2x.png)

## Revision History

- **2024-12-17** First published.

## See Also

[TN3181: Debugging an invalid privacy manifest](/documentation/Technotes/tn3181-debugging-invalid-privacy-manifest)

Identify common configurations that cause unsuccessful privacy manifest validation with the App Store.

[TN3182: Adding privacy tracking keys to your privacy manifest](/documentation/Technotes/tn3182-adding-privacy-tracking-keys-to-your-privacy-manifest)

Declare the tracking domains you use in your app or third-party SDK in a privacy manifest.

[TN3184: Adding data collection details to your privacy manifest](/documentation/Technotes/tn3184-adding-data-collection-details-to-your-privacy-manifest)

Declare the data your app or third-party SDK collects in a privacy manifest.



---

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)