Apple Privacy Manifest
Troubleshoot and resolve common issues with the Apple Privacy Manifest and Sentry Xamarin SDK.
This guide requires @sentry/xamarin@2.1.0 or newer.
Sentry's SDKs provide error and performance monitoring for mobile applications running on Apple devices. To do this, the SDK needs to access certain information about the device and the application. Some of the APIs required for this are considered privacy-relevant by Apple. In order to submit apps to the App Store, Apple requires all apps - and libraries used within these apps - to provide privacy manifest files stating which APIs are used under which allowed reasons. For more details, read Apple's guidelines on Describing use of required reason API.
The information and steps in this guide are still being worked on and might change because of new tools or updated Apple requirements.
During the build process, the SDK will provide your project a privacy manifest file containing only the required information used by the SDK. If you are providing your own privacy manifest, you'll need to include the below rules in your privacyinfo.xcprivacy
file. This guide will help you create the privacy manifest for your Xamarin applications.
Note that the application privacy manifest covers all data usages (via NSPrivacyCollectedDataTypes
) and API usages (via NSPrivacyAccessedAPITypes
) for the whole application and all included libraries. The examples below reflect the current requirements for the Sentry SDKs alone. If you are using other libraries that access privacy-relevant APIs, you need to include them in the privacy manifest as well.
First, you need to create a privacy manifest file in your iOS project. This file should be named PrivacyInfo.xcprivacy
and should be placed in the root of your Xcode project. Follow the Privacy manifest files guide by Apple to create the file.
PrivacyInfo.xcprivacy
<?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>NSPrivacyCollectedDataTypeCrashData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false />
<key>NSPrivacyCollectedDataTypeTracking</key>
<false />
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypePerformanceData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false />
<key>NSPrivacyCollectedDataTypeTracking</key>
<false />
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
<dict>
<key>NSPrivacyCollectedDataType</key>
<string>NSPrivacyCollectedDataTypeOtherDiagnosticData</string>
<key>NSPrivacyCollectedDataTypeLinked</key>
<false />
<key>NSPrivacyCollectedDataTypeTracking</key>
<false />
<key>NSPrivacyCollectedDataTypePurposes</key>
<array>
<string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
</array>
</dict>
</array>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
</array>
</dict>
</plist>
After adding the privacy manifest file, don't forget to alter the file properties to bundle resource
and Copy to Output Directory
as Copy if newer
.
For more information about generating the privacy manifest using Xamarin, read the Privacy manifests guide by Microsoft.
The listed APIs are required for the SDK to function correctly and there is no way to opt-out of them.
If you are using an older version of the SDK, you may need to update to version 2.1.0 or later to automatically include the privacy manifest if you haven't provided one.
To verify the privacy manifest is included in your app correctly, build and submit your app to the App Store or TestFlight for external testing. If the manifest is missing, you will receive an email from Apple with the subject, "The uploaded build for YourAppName has one or more issues", that lists the missing API declarations.
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").