Adding PrivacyInfo to Your iOS App
Read a tutorial on how to add a Privacy Manifest to your codebase, which has been required by Apple since the beginning of May 2024.
Starting from May 1, Apple demands the addition of a Privacy Manifest to your codebase. This file provides an explanation why your app is using 'SDKs that require a privacy manifest and signature'.
Find more info here.
Do I have to take action?
If you received an email from AppStoreConnect containing the phrase:
ITMS-91053: Missing API declaration
Then you are among the lucky ones who have to add it. Thankfully, this email will also include every NSPrivacyAccessedAPITypes that you need to incorporate, like the mysterious-sounding NSPrivacyAccessedAPICategoryFileTimestamp
Let’s dive in
To add PrivacyInfo.xcprivacy (which is a regular .plist file), first click on your project in the Project Navigator.
And then on File -> New -> File…
Search for Privacy
Then add it to your main target. Keep in mind that the path matters! Apple is really strict about where you place this file. You can find more information here.
If you're using Tuist or XcodeGen, don't forget to add this new file to your configuration as well :).
Or if you are using Tuist version 4.10+ you can use the dedicated struct example here.
Explain yourself
In my case, I had to add an explanation about the usage of creationDate for files, so I'll use it as an example. A list of APIs which require an explanation along with their respective justification codes can be found here.
For now, you don't need to add an explanation for using a specific API. You just have to type the code. In my case, it was DDA9.1.
Then, my file looked as follows.
And a bit more self-exploratory xml version
And that's all, folks! Read through each explanation carefully (even though it's written in a difficult legal language), and choose the one that best describes your usage.
If you have more questions, feel free to contact me :).