He is Troubleshooting the iOS Privacy Manifest

Required Reason API: Troubleshooting your iOS Privacy Manifest file PrivacyInfo.xcprivacy

Jochen Holzer
3 min readApr 4, 2024

Do you need a Privacy Manifest for your app but have no clue where to start? You’ve created the Privacy Manifest and encountered issues? You’ve come to the right place. Encountering obstacles in implementing the Required Reason API for the iOS Privacy Manifest (PrivacyInfo.xcprivacy) is not uncommon.

In this continuously updated article we compile issues and solutions concerning iOS Privacy Manifest and the Required Reason API

If you haven’t created a Privacy Manifest for your iOS app yet, read this article.

If you’ve encountered a problem that hasn’t been mentioned here, write it in the comments, and we’ll address it.

Common problems

What is the quickest and easiest way to create a Privacy Manifest for my iOS app?

Answer: There are now Privacy Manifest generators available online:

Both are functional and expedite the process effectively.

3rd-Party Library does not provide a privacy manifest

“A third-party library uses the ‘Required Reason API’ but does not provide a Privacy Manifest — How can I still publish the app?”

Answer: If there is no new version of the third-party SDK available with a PrivacyInfo.xcprivacy file you must add the reasons to your app’s privacy manifest. Ensure that the provided justification is accurate.

The app doesn’t seem to be using the Privacy Manifest

I have created the file PrivacyInfo.xcprivacy but AppStore Connect still complains that the app uses an API that requires a reason.

Solution: Make sure you have added the file to the build target so that it is also available in the IPA.

Common Error Messages

Error: Missing an expected key: ‘NSPrivacyCollectedDataTypes’

Solution: You need to add so called “nutrition label” entries e.g. NSPrivacyCollectedDataTypePurchaseHistory the NSPrivacyCollectedDataTypes to your privacy manifest

For details see Apples documentation on how to describe data use in privacy manifests

Heres an example:

<?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>NSPrivacyCollectedDataTypes</key>
<array>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypePurchaseHistory</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<true/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<true/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeDeveloperAdvertising</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeSearchHistory</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<true/>
<key>NSPrivacyCollectedDataTypeTracking</key>
<true/>
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeDeveloperAdvertising</string>
</array>
</dict>
</array>
</dict>
</plist>

Error: ’Multiple commands produce PrivacyInfo.xcprivacy’ (when using a third party library via cocoapods)

Solution: The problem seems to appear when using 3rd party cocoapods which include a PrivacyInfo.xcprivacy file.

The problem must be solved by the developer of the 3rd party lib by changing the podspec:
Change:

sp.resource = “Sources/Resources/PrivacyInfo.xcprivacy”

to

sp.resource_bundles = { “Podname” => “Sources/Resources/PrivacyInfo.xcprivacy” }

Closing Thoughts: Engage with Us to Solve Your iOS Privacy Manifest Issues

Your feedback and questions are invaluable in enhancing this resource for all developers. If you have encountered any issues or have questions not covered in this article, don’t hesitate to share them in the comments below. Together, we can continue to refine our understanding and ensure smooth sailing in iOS app development. Your contributions are greatly appreciated!

--

--

Jochen Holzer
Jochen Holzer

Written by Jochen Holzer

"Seasoned (iOS) Engineer. Expert in the Apple Universe, Mobile DevOps and App Maintenance.

Responses (5)