Apple privacy manifest (PrivacyInfo.xcprivacy) generator

A privacy manifest is a PrivacyInfo.xcprivacy property list that declares tracking, the data you collect and why you use required-reason APIs such as UserDefaults or file timestamps. Pick your answers and the generator writes the XML, checks every API category has an approved reason code, and flags SDKs that need their own manifest.

Updated

Tracking means linking your app's data with data from other companies' apps and sites for ads, or sharing it with data brokers.

Types and purposes are in the tables below. Purposes: functionality, analytics, personalization, dev-ads, 3p-ads, other.

Checked against Apple's list of SDKs that must ship their own manifest.

PrivacyInfo.xcprivacy

3 data types, 2 API categories

Tracking off · 0 tracking domains

  • Pass · UserDefaultsCA92.1
  • Pass · File timestampC617.1

PrivacyInfo.xcprivacy (property list XML)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>NSPrivacyTracking</key>
    <false/>
    <key>NSPrivacyTrackingDomains</key>
    <array/>
    <key>NSPrivacyCollectedDataTypes</key>
    <array>
        <dict>
            <key>NSPrivacyCollectedDataType</key>
            <string>NSPrivacyCollectedDataTypeEmailAddress</string>
            <key>NSPrivacyCollectedDataTypeLinked</key>
            <true/>
            <key>NSPrivacyCollectedDataTypeTracking</key>
            <false/>
            <key>NSPrivacyCollectedDataTypePurposes</key>
            <array>
                <string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
            </array>
        </dict>
        <dict>
            <key>NSPrivacyCollectedDataType</key>
            <string>NSPrivacyCollectedDataTypeUserID</string>
            <key>NSPrivacyCollectedDataTypeLinked</key>
            <true/>
            <key>NSPrivacyCollectedDataTypeTracking</key>
            <false/>
            <key>NSPrivacyCollectedDataTypePurposes</key>
            <array>
                <string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
                <string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
            </array>
        </dict>
        <dict>
            <key>NSPrivacyCollectedDataType</key>
            <string>NSPrivacyCollectedDataTypeCrashData</string>
            <key>NSPrivacyCollectedDataTypeLinked</key>
            <false/>
            <key>NSPrivacyCollectedDataTypeTracking</key>
            <false/>
            <key>NSPrivacyCollectedDataTypePurposes</key>
            <array>
                <string>NSPrivacyCollectedDataTypePurposeAnalytics</string>
            </array>
        </dict>
    </array>
    <key>NSPrivacyAccessedAPITypes</key>
    <array>
        <dict>
            <key>NSPrivacyAccessedAPIType</key>
            <string>NSPrivacyAccessedAPICategoryUserDefaults</string>
            <key>NSPrivacyAccessedAPITypeReasons</key>
            <array>
                <string>CA92.1</string>
            </array>
        </dict>
        <dict>
            <key>NSPrivacyAccessedAPIType</key>
            <string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
            <key>NSPrivacyAccessedAPITypeReasons</key>
            <array>
                <string>C617.1</string>
            </array>
        </dict>
    </array>
</dict>
</plist>
Reasons you declared, in plain language
CategoryCodeWhat it allows
UserDefaultsCA92.1Read and write settings that only your own app can see.
File timestampC617.1Read dates, size or other metadata of files inside your app container, app group container or CloudKit container.
  • Apple expects each executable or dynamic library that uses these APIs to report them in its own bundle's manifest. A third-party SDK cannot rely on your app's manifest, and your app's manifest need not cover the data an SDK collects.

What goes into a PrivacyInfo.xcprivacy file?

A privacy manifest is a property list named PrivacyInfo.xcprivacy that ships inside your app or SDK bundle. It has four top-level keys: NSPrivacyTracking (a boolean), NSPrivacyTrackingDomains (hosts that are blocked until the user allows tracking), NSPrivacyCollectedDataTypes (what you collect and why) and NSPrivacyAccessedAPITypes (which required-reason APIs you call).

Each collected data type is a dictionary with the data type, whether it is linked to the user's identity, whether it is used for tracking, and one or more purposes. Apple tells you to use only its own values; Xcode builds the privacy report wrongly if you invent types or purposes.

Required-reason APIs are the few system calls Apple considers useful for fingerprinting: file timestamps, system boot time, disk space, active keyboards and UserDefaults. Each category you use needs at least one approved reason code that matches how you use it. Since 1 May 2024, App Store Connect does not accept apps that use these APIs without declaring a reason.

This tool checks the parts it can: every ticked category has a code, every code belongs to its category, tracking and tracking domains agree, and every data line parses. It cannot see your code, so it cannot tell you which APIs you call. Search your project, and your Swift packages, for the APIs in the reference table.

Preparing the store listing too? See the App Store and Google Play listing limits.

Which reason code do I declare for each required-reason API?

Apple's approved reason codes, in our plain wording. The category key goes in NSPrivacyAccessedAPIType; the codes go in NSPrivacyAccessedAPITypeReasons.
CategoryCodeIn plain language
UserDefaults (UserDefaults)CA92.1Read and write settings that only your own app can see.
UserDefaults (UserDefaults)1C8F.1Read and write settings shared only with your own apps, extensions and App Clips in one App Group.
UserDefaults (UserDefaults)C56D.1SDKs only: a wrapper around UserDefaults that runs only when the host app calls it.
UserDefaults (UserDefaults)AC6B.1Read the managed-app configuration key set by MDM, or write the MDM feedback key.
File timestamp (FileTimestamp)DDA9.1Show file dates to the person using the device. Nothing derived may leave the device.
File timestamp (FileTimestamp)C617.1Read dates, size or other metadata of files inside your app container, app group container or CloudKit container.
File timestamp (FileTimestamp)3B52.1Read dates, size or metadata of files or folders the user chose to give you, for example through a document picker.
File timestamp (FileTimestamp)0A2A.1SDKs only: a wrapper around file timestamp APIs that runs only when the host app calls it.
System boot time (SystemBootTime)35F9.1Measure time elapsed between events in your app, or drive timers. The elapsed time may be sent off-device; boot time itself may not.
System boot time (SystemBootTime)8FFB.1Calculate absolute timestamps for events in your app, such as UIKit or AVFAudio events. The timestamps may be sent; boot time may not.
System boot time (SystemBootTime)3D61.1Include boot time in an optional bug report the user chooses to send, shown clearly in the report.
Disk space (DiskSpace)85F4.1Show disk space to the person using the device, in bytes or in minutes of a media type.
Disk space (DiskSpace)E174.1Check there is room to write files, or clean up when space is low, in a way users can see. Nothing derived may leave the device (skipping a download is allowed).
Disk space (DiskSpace)7D9E.1Include disk space in an optional bug report the user chooses to send, shown clearly in the report.
Disk space (DiskSpace)B728.1Health research apps only: warn participants that low disk space is hurting data collection.
Active keyboards (ActiveKeyboards)3EC4.1Custom keyboard apps only: find the keyboards active on the device, where a systemwide keyboard is the app's main function.
Active keyboards (ActiveKeyboards)54BD.1Change your interface based on the active keyboards, in a way users can observe, in an app with text fields.

How to create a privacy manifest for an iOS app

  1. 1
    Decide on trackingSay yes only if your app links data with other companies' data for advertising or shares it with data brokers. If yes, list the domains that do the tracking.
  2. 2
    List the data you collectOne line per type: type | linked | tracking | purposes, for example EmailAddress | yes | no | functionality. Use the type and purpose names in the tables.
  3. 3
    Tick the required-reason APIs you callSearch your code for UserDefaults, file attribute and stat calls, systemUptime or mach_absolute_time, volume capacity keys and activeInputModes. Add the reason code that matches why you call it.
  4. 4
    Download the file and add it to your targetIn Xcode choose File > New File > App Privacy, or drag the downloaded file into the target's resources. Keep the name PrivacyInfo.xcprivacy, then archive and use Generate Privacy Report to check it with your SDKs' manifests.

Frequently asked questions

Is a privacy manifest mandatory for iOS apps?
Declaring required-reason API use is. Since 1 May 2024 App Store Connect does not accept apps that use those APIs without a reason in the manifest. Collected data types go in the manifest too, and Xcode uses them to build the privacy report that helps you fill in the App Store privacy details.
Which reason code should I use for UserDefaults?
CA92.1 if the app only reads and writes its own settings. Use 1C8F.1 if you share them with your own apps and extensions in an App Group. C56D.1 is only for SDKs that wrap UserDefaults, and AC6B.1 only for the MDM managed-app keys.
Do I need to list the data my third-party SDKs collect?
No. Apple says each SDK provides its own manifest for the data it collects, and your app's manifest need not cover it. Xcode combines them when you generate the privacy report from an archive.
What happens to a tracking domain if the user refuses tracking?
If the user has not granted permission through App Tracking Transparency, network requests to the listed domains fail and your app gets an error. That is why tracking domains must be a real, complete list.
Can I invent a reason if none fits my use of an API?
Not in the file. If you use a required-reason API to benefit users for a reason Apple has not listed, Apple provides a form to request a new approved reason. Until it is approved, adding your own code would not be valid.
Does this tool see my code or send my answers anywhere?
No. It builds the XML in your browser from what you type, and it cannot scan code. You still need to search your project for the APIs yourself.

Sources

Related tools

See all 135 free tools

Need a custom dev tool for your team?

We build internal tools, dashboards, APIs, and SaaS platforms. If you can describe it, we can ship it.

Built by CountryDevs · No signup · No ads · We count visits, never what you enter