Privacy Manifests
Advisory skill for implementing Apple's privacy manifest (PrivacyInfo.xcprivacy) requirements: manifest file format, required reason APIs, tracking declarations, third-party SDK privacy, and App Tracking Transparency.
When This Skill Activates
Use this skill when the user:
- Asks about "privacy manifest" or "PrivacyInfo.xcprivacy"
- Mentions "required reason API" or App Store privacy rejection
- Needs to declare "tracking domains" or "NSPrivacyTracking"
- Asks about "App Tracking Transparency" or ATT
- Wants to audit third-party SDK privacy declarations
- Is preparing an app for App Store submission and mentions privacy
- Gets an App Store Connect warning about missing privacy manifests
- Asks about "privacy nutrition labels" or App Store privacy details
Decision Tree
Review Process
1. Scan the Project
2. Determine What Is Missing and Apply Fixes
Check: Does PrivacyInfo.xcprivacy exist? Are all required reason APIs declared? Is NSPrivacyTracking correct? Are tracking domains listed? Do third-party SDKs have their own manifests? Use the sections below to generate correct entries.
Privacy Manifest File Format
The privacy manifest is a property list named PrivacyInfo.xcprivacy. Add it via File > New > File > App Privacy in Xcode. Four required top-level keys:
Where to Place the File
- App targets: Add PrivacyInfo.xcprivacy to the root of the app bundle. In Xcode, ensure it is included in the target's "Copy Bundle Resources" build phase.
- Frameworks/SDKs: Place PrivacyInfo.xcprivacy in the root of the framework bundle.
- Swift packages: Place PrivacyInfo.xcprivacy in the package's resource bundle and declare it in Package.swift:
Required Reason APIs
Apple requires you to declare why your app uses certain system APIs. You must include at least one valid reason code for each API category your app uses.
File Timestamp APIs (NSPrivacyAccessedAPICategoryFileTimestamp)
APIs that access file creation or modification dates.
Common triggers: NSFileCreationDate, NSFileModificationDate, NSURLContentModificationDateKey, NSURLCreationDateKey, getattrlist, stat, fstat.
System Boot Time APIs (NSPrivacyAccessedAPICategorySystemBootTime)
APIs that read how long the system has been running.
Common triggers: systemUptime, ProcessInfo.processInfo.systemUptime, mach_absolute_time, clock_gettime(CLOCK_MONOTONIC).
Disk Space APIs (NSPrivacyAccessedAPICategoryDiskSpace)
APIs that query available or total disk space.
Common triggers: volumeAvailableCapacityKey, volumeAvailableCapacityForImportantUsageKey, volumeAvailableCapacityForOpportunisticUsageKey, volumeTotalCapacityKey, statfs, statvfs.
User Defaults APIs (NSPrivacyAccessedAPICategoryUserDefaults)
APIs that read or write to UserDefaults.
Common triggers: UserDefaults, NSUserDefaults, standardUserDefaults.
Active Keyboards API (NSPrivacyAccessedAPICategoryActiveKeyboards)
APIs that enumerate installed keyboards.
Common triggers: UITextInputMode.activeInputModes, activeInputModes.
Declaring Required Reason APIs in the Manifest
Each entry has the category identifier and an array of reason codes. See "Common Patterns" below for a full XML example.
Tracking Domains and NSPrivacyTracking
NSPrivacyTracking declares whether your app tracks users. Apple defines tracking as: linking user/device data from your app with data from other companies' apps, websites, or offline properties for advertising, or sharing data with data brokers.
Apple does not consider these to be tracking: on-device-only data linking, fraud detection, security, or compliance.
If NSPrivacyTracking is true:
- You must implement App Tracking Transparency (ATT) before any tracking occurs
- List all tracking domains in
NSPrivacyTrackingDomains(the system blocks them until ATT is granted)
If your app does not track users, set NSPrivacyTracking to false and leave the domains array empty.
Third-Party SDK Declarations
SDK Privacy Manifests
Starting Spring 2024, apps that include commonly used third-party SDKs must ensure those SDKs provide their own PrivacyInfo.xcprivacy files. Apple publishes a list of SDKs that require privacy manifests and signatures, including Alamofire, FBSDKCoreKit, Firebase, Google Analytics, Kingfisher, Lottie, Realm, SDWebImage, and many others. See Apple's full list.
SDK Signatures
Third-party XCFrameworks should be signed by their developer. Prefer SDKs distributed through Swift Package Manager (signatures verified automatically). For XCFrameworks, verify the signature matches the expected developer.
Auditing Third-Party SDKs
If a third-party SDK lacks a privacy manifest and uses required reason APIs, contact the maintainer -- declaring its API usage in your own manifest is a stopgap, not a fix.
App Tracking Transparency
When ATT Is Required
You must present the ATT prompt if:
- NSPrivacyTracking is true in your privacy manifest
- Your app links user data with third-party data for advertising
- You use advertising identifiers (IDFA) for tracking purposes
You do not need ATT for:
- First-party analytics that stay on-device or on your own servers without linking to third-party data
- SKAdNetwork attribution (privacy-preserving, no user-level data)
- Fraud detection or security purposes
Implementation
Info.plist Requirement
SKAdNetwork for Attribution
Register ad network identifiers in Info.plist:
Privacy Nutrition Labels
The privacy manifest feeds into the App Store privacy labels ("nutrition labels") displayed on your app's product page. The connection works as follows:
NSPrivacyCollectedDataTypes Format
Each entry declares: data type, whether it is linked to user identity, whether it is used for tracking, and purposes.
Common data types: EmailAddress, Name, PhoneNumber, Location, DeviceID, CrashData, PerformanceData, ProductInteraction, PurchaseHistory (prefix each with NSPrivacyCollectedDataType).
Common purposes: AppFunctionality, Analytics, ThirdPartyAdvertising, ProductPersonalization (prefix each with NSPrivacyCollectedDataTypePurpose).
The App Store privacy label must match your manifest declarations. Inconsistencies trigger review delays or rejections.
Xcode Privacy Report
Generate a consolidated report via Product > Generate Privacy Report (or from the Organizer after archiving). Xcode produces a PDF listing all privacy manifest entries from the app and every embedded framework/SDK. Use this to verify all required reason APIs are declared, confirm third-party SDKs include their own manifests, and cross-check collected data types before filling out App Store Connect privacy labels.
Top Mistakes
-
Missing PrivacyInfo.xcprivacy entirely -- Every App Store submission requires a privacy manifest. Without one, expect a warning or rejection.
-
Using UserDefaults without declaring it -- declare
NSPrivacyAccessedAPICategoryUserDefaultswith reasonCA92.1.- ❌
UserDefaults.standard.set(true, forKey: "onboardingComplete")with no manifest entry - ✅ Add CA92.1 declaration for data accessible only to the app
- ❌
-
Wrong reason code -- using DDA9.1 (display to user) when you never show timestamps in the UI causes rejection; use C617.1 for app container access instead.
-
Forgetting third-party SDK manifests -- Your app's manifest does not cover SDKs. Each must provide its own. SDKs on Apple's list without manifests will flag your submission.
-
NSPrivacyTracking true without ATT -- If you declare tracking, you must implement the ATT prompt before any tracking occurs. Missing this causes rejection.
-
Stale privacy nutrition labels -- After updating your manifest, also update the App Store Connect privacy labels. Inconsistencies trigger review issues.
Review Checklist
- PrivacyInfo.xcprivacy exists in the app target's bundle resources
- NSPrivacyTracking set correctly (true only if the app tracks users)
- NSPrivacyTrackingDomains lists all tracking domains (if tracking is true)
- All required reason APIs declared with valid reason codes (file timestamps, boot time, disk space, UserDefaults, active keyboards)
- Reason codes match actual API usage (not just any valid code)
- NSPrivacyCollectedDataTypes lists all collected data
- Third-party SDKs include their own PrivacyInfo.xcprivacy and are signed
- ATT prompt implemented if NSPrivacyTracking is true
- NSUserTrackingUsageDescription in Info.plist if ATT is used
- App Store Connect privacy labels match manifest declarations
- Xcode privacy report generated and reviewed (Product > Generate Privacy Report)
- Swift packages declare PrivacyInfo.xcprivacy in their resource bundle
Common Patterns
Typical App (No Tracking)
Most apps need at minimum UserDefaults declared. Start from the minimal manifest structure above and populate NSPrivacyAccessedAPITypes:
App with Tracking and Ad Attribution
Add to the template above: set NSPrivacyTracking to true, list tracking domains, add NSPrivacyCollectedDataTypes entries (see "Privacy Nutrition Labels" for format), implement ATT, and add NSPrivacyAccessedAPICategoryDiskSpace with reason 7D9E.1 if sending disk metrics off-device.


