---
title: "TN3184: Adding data collection details to your privacy manifest"
framework: technotes
role: article
role_heading: Article
path: technotes/tn3184-adding-data-collection-details-to-your-privacy-manifest
---

# TN3184: Adding data collection details to your privacy manifest

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

## Overview

Overview When you build an app or third-party SDK that collects any data type, perform these steps in your privacy manifest (PrivacyInfo.xcprivacy): Add the NSPrivacyCollectedDataTypes key. For each data type your app or third-party SDK collects, add a dictionary as a value for the NSPrivacyCollectedDataTypes key. The dictionary includes the data type, the data linked to the user and tracking status, and a list of reasons for collecting this data type. For more information, see Add a collected data type and reasons dictionary. For more information about the privacy manifest and these keys, see Privacy manifest files and Describing data use in privacy manifests. This document describes how to add the NSPrivacyCollectedDataType, NSPrivacyCollectedDataTypeLinked, NSPrivacyCollectedDataTypeTracking, and NSPrivacyCollectedDataTypePurposes 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. Add a collected data type key The NSPrivacyCollectedDataType key uses the following format: <key>NSPrivacyCollectedDataType</key> <string>NS_PRIVACY_COLLECTED_DATA_TYPE_VALUE</string> The NS_PRIVACY_COLLECTED_DATA_TYPE_VALUE string specifies the type of data your app or third-party SDK collects. For possible values, see “Report the categories of data your app or third-party SDK collects“ in Describing data use in privacy manifests. To add the NSPrivacyCollectedDataType key to a privacy collected data type and reasons dictionary in your privacy manifest: Select the dictionary in the property list editor. Click the disclosure triangle to the left of the dictionary to reveal it. Click the Add button (+) beside the dictionary to add a new item. In the pop-up menu, choose NSPrivacyCollectedDataType. In the Type column, confirm that the value is String. Select a data type from the pop-up menu in the Value column. For possible values, see “Report the categories of data your app or third-party SDK collects“ in Describing data use in privacy manifests. Confirm that the value exactly matches the type of data your app or third-party SDK collects. Add a collected data type linked key The NSPrivacyCollectedDataTypeLinked key uses the following format: <key>NSPrivacyCollectedDataTypeLinked</key> <!-- Use <true/> if your app or third-party SDK links this data type to the user’s identity; otherwise,      use <false/>. --> <true/> To add the NSPrivacyCollectedDataTypeLinked key to a privacy collected data type and reasons dictionary in your privacy manifest: Select the dictionary in the property list editor. Click the disclosure triangle to the left of the dictionary to reveal it. Click the Add button (+) beside the dictionary to add a new item. In the pop-up menu, choose NSPrivacyCollectedDataTypeLinked. In the Type column, confirm that the value is Boolean. Select YES from the pop-up menu in the Value column if your app or third-party SDK links this data type to the user’s identity; otherwise, select NO. Add a collected data type tracking key The NSPrivacyCollectedDataTypeTracking key uses the following format: <key>NSPrivacyCollectedDataTypeTracking</key> <!-- Use <true/> if your app or third-party SDK uses this data type to track; otherwise, use <false/>. --> <true/> To add the NSPrivacyCollectedDataTypeTracking key to a privacy collected data type and reasons dictionary in your privacy manifest: Select the dictionary in the property list editor. Click the disclosure triangle to the left of the dictionary to reveal it. Click the Add button (+) beside the dictionary to add a new item. In the pop-up menu, choose NSPrivacyCollectedDataTypeTracking. In the Type column, confirm that the value is Boolean. Select YES from the pop-up menu in the Value column if your app or third-party SDK uses this data type to track; otherwise, select NO. Add a collected data type purposes key The NSPrivacyCollectedDataTypePurposes key uses the following format: <key>NSPrivacyCollectedDataTypePurposes</key> <array>     <string>NS_PRIVACY_COLLECTED_DATA_TYPE_PURPOSE_VALUE</string>     ... </array> Each NS_PRIVACY_COLLECTED_DATA_TYPE_PURPOSE_VALUE string in the array identifies a reason why your app or third-party SDK collects a data type. For possible values, see “Report the reasons your app or third-party SDK collects data” in Describing data use in privacy manifests. To add the NSPrivacyCollectedDataTypePurposes key to a privacy collected data type and reasons dictionary in your privacy manifest: Select the dictionary in the property list editor. Click the disclosure triangle to the left of the dictionary to reveal it. Confirm the dictionary contains a NSPrivacyCollectedDataType key with a value as described in Add a collected data type key. Click the Add button (+) beside the dictionary to add a new item. In the pop-up menu, choose NSPrivacyCollectedDataTypePurposes. In the Type column, confirm that the value is Array. Click the disclosure triangle to the left of NSPrivacyCollectedDataTypePurposes to reveal it. Click the Add button (+) beside NSPrivacyCollectedDataTypePurposes to add a reason. Choose a reason from the pop-up menu in the Value column. For possible values, see “Report the reasons your app or third-party SDK collects data” in Describing data use in privacy manifests. Repeat the last two steps for each reason your app or third-party SDK collects this data type. Add a collected data type and reasons dictionary A privacy collected data type and reasons dictionary includes a data type, a data linked to the user status, a tracking status, and a list of reasons for collecting this data type. The dictionary contains exactly four keys: NSPrivacyCollectedDataType, NSPrivacyCollectedDataTypeLinked, NSPrivacyCollectedDataTypeTracking, and NSPrivacyCollectedDataTypePurposes. It uses the following format: <dict>     <!-- Add a privacy collected data type key. -->     <key>NSPrivacyCollectedDataType</key>     <string>NS_PRIVACY_COLLECTED_DATA_TYPE_VALUE</string>

<!-- Add a privacy collected data type linked key. -->     <key>NSPrivacyCollectedDataTypeLinked</key>     <false/>

<!-- Add a privacy collected data type tracking key. -->     <key>NSPrivacyCollectedDataTypeTracking</key>     <false/>

<!-- Add a privacy collected data type purposes key. -->     <key>NSPrivacyCollectedDataTypePurposes</key>     <array>         <string>NS_PRIVACY_COLLECTED_DATA_TYPE_PURPOSE_VALUE</string>         ...     </array> </dict> To add a privacy collected data type and reasons dictionary to the NSPrivacyCollectedDataTypes key in your privacy manifest: Select PrivacyInfo.xcprivacy in the Project navigator in Xcode. Find the NSPrivacyCollectedDataTypes key in the property list editor. Click the disclosure triangle to the left of NSPrivacyCollectedDataTypes to reveal it. Click the Add button (+) beside NSPrivacyCollectedDataTypes to insert a new item. Confirm the value is Dictionary in the Type column. Click the disclosure triangle to the left of the dictionary to reveal it. To add the NSPrivacyCollectedDataType key to the dictionary, see Add a collected data type key. To add the NSPrivacyCollectedDataTypeLinked key to the dictionary, see Add a collected data type linked key. To add the NSPrivacyCollectedDataTypeTracking key to the dictionary, see Add a collected data type tracking key. To add the NSPrivacyCollectedDataTypePurposes key to the dictionary, see Add a collected data type purposes key. Add the collected data types key The NSPrivacyCollectedDataTypes key is an array of privacy collected data type and reasons dictionaries. For more information, see Add a collected data type and reasons dictionary. The key uses the following format: <key>NSPrivacyCollectedDataTypes</key> <array>     <dict>         <!-- Add a privacy collected data type key. -->         <key>NSPrivacyCollectedDataType</key>         <string>NS_PRIVACY_COLLECTED_DATA_TYPE_VALUE</string>

<!-- Add a privacy collected data type linked key. -->         <key>NSPrivacyCollectedDataTypeLinked</key>         <false/>

<!-- Add a privacy collected data type tracking key. -->         <key>NSPrivacyCollectedDataTypeTracking</key>         <false/>

<!-- Add a privacy collected data type purposes key. -->         <key>NSPrivacyCollectedDataTypePurposes</key>         <array>             <string>NS_PRIVACY_COLLECTED_DATA_TYPE_PURPOSE_VALUE</string>             ...         </array>     </dict>     ... </array> To add the NSPrivacyCollectedDataTypes key to your privacy manifest: Select PrivacyInfo.xcprivacy in the Project navigator. Click the Add button (+) beside the App Privacy Configuration key in the property list editor. In the pop-up menu that appears, choose NSPrivacyCollectedDataTypes. Confirm the value is Array in the Type column. To add a privacy collected data type and reasons dictionary, see Add a collected data type and reasons dictionary. The following example declares the contacts information collected from the user in an app named Sample: Repeat step 5 for each additional data type your app or third-party SDK collects. In the following example, Sample additionally collects user ID information from the user: Revision History 2024-12-17 First published.

## See Also

### Latest

- [TN3210: Optimizing your app for iPhone Mirroring](technotes/tn3210-optimizing-your-app-for-iphone-mirroring.md)
- [TN3211: Resolving SwiftUI source incompatibilities for State and ContentBuilder](technotes/tn3211-resolving-swiftui-source-incompatibilities-for-state-and-contentbuilder.md)
- [TN3212: Adopting gesture recognizers for Sidecar touch support](technotes/tn3212-adopting-gesture-recognizers-for-sidecar-touch-support.md)
- [TN3208: Preparing your app’s launch screen to meet App Store requirements](technotes/tn3208-preparing-your-apps-launch-screen-to-meet-app-store-requirements.md)
- [TN3205: Low-latency communication with RDMA over Thunderbolt](technotes/tn3205-low-latency-communication-with-rdma-over-thunderbolt.md)
- [TN3206: Updating Apple Pay certificates](technotes/tn3206-updating-apple-pay-certificates.md)
- [TN3179: Understanding local network privacy](technotes/tn3179-understanding-local-network-privacy.md)
- [TN3190: USB audio device design considerations](technotes/tn3190-usb-audio-device-design-considerations.md)
- [TN3194: Handling account deletions and revoking tokens for Sign in with Apple](technotes/tn3194-handling-account-deletions-and-revoking-tokens-for-sign-in-with-apple.md)
- [TN3193: Managing the on-device foundation model’s context window](technotes/tn3193-managing-the-on-device-foundation-model-s-context-window.md)
- [TN3115: Bluetooth State Restoration app relaunch rules](technotes/tn3115-bluetooth-state-restoration-app-relaunch-rules.md)
- [TN3192: Migrating your iPad app from the deprecated UIRequiresFullScreen key](technotes/tn3192-migrating-your-app-from-the-deprecated-uirequiresfullscreen-key.md)
- [TN3151: Choosing the right networking API](technotes/tn3151-choosing-the-right-networking-api.md)
- [TN3111: iOS Wi-Fi API overview](technotes/tn3111-ios-wifi-api-overview.md)
- [TN3191: IMAP extensions supported by Mail for iOS, iPadOS, and visionOS](technotes/tn3191-imap-extensions-supported-by-mail.md)
