Apple Privacy Manifest

Troubleshoot and resolve common issues with the Apple Privacy Manifest and Sentry Kotlin Multiplatform SDK.

This guide requires using @sentry/cocoa@8.21.0 in combination with our Kotlin Multiplatform SDK.

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.

If you are using dynamically linked frameworks which is the default when creating a Kotlin Multiplatform framework, Apple will automatically process the SDK's privacy manifest. If you are using statically linked libraries, you need to provide the privacy manifest yourself. This guide will help you create the privacy manifest for your Kotlin Multiplatform applications.

Create a privacy manifest file in your Xcode 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.

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 example below reflects the current requirements for the Sentry SDK alone. If you are using other libraries that access privacy-relevant APIs, you need to include them in the privacy manifest as well.

PrivacyInfo.xcprivacy
Copied
<?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>NSPrivacyAccessedAPICategoryUserDefaults</string>
			<key>NSPrivacyAccessedAPITypeReasons</key>
			<array>
				<string>CA92.1</string>
			</array>
		</dict>
		<dict>
			<key>NSPrivacyAccessedAPIType</key>
			<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
			<key>NSPrivacyAccessedAPITypeReasons</key>
			<array>
				<string>35F9.1</string>
			</array>
		</dict>
		<dict>
			<key>NSPrivacyAccessedAPIType</key>
			<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
			<key>NSPrivacyAccessedAPITypeReasons</key>
			<array>
				<string>C617.1</string>
			</array>
		</dict>
	</array>
</dict>
</plist>

  • 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 Sentry Cocoa SDK, you may need to update to version 8.21.0 to automatically include the privacy manifest for dynamically linked frameworks.

  • 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.

Help improve this content
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").