Starting May 1, 2024 you will want to include a PrivacyInfo.xcprivacy
manifest in your App_Resources/iOS
folder. Let's look at what it may look like for your app.
You can learn more about Privacy Manifests in this WWDC 2023 video.
If you received an email similar to this after uploading a build to TestFlight then this applies to you:
You can refer to Apple Docs here to find the specific API Type mentioned in your notice.
In the above notice, it mentions NSPrivacyAccessedAPICategoryUserDefaults
. A search for this in the Apple docs reveals several approved reasons to use this API category. Read the descriptions to see which applies to your case.
In our case above, CA92.1
applies to our usage:
CA92.1: Declare this reason to access user defaults to read and write information that is only accessible to the app itself.
This reason does not permit reading information that was written by other apps or the system, or writing information that can be accessed by other apps.
With our reason now identified, we can create App_Resources/iOS/PrivacyInfo.xcprivacy
with the following:
<?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>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
</array>
</dict>
</plist>
You can include as many dict
sections for each API Type needed for your app's compliance referring to the Apple Docs for each reason code needed.
You can commit this to your project and the {N} CLI will always build it into your project for you.
Now enjoy shipping awesome apps!