Privacy manifest for multiple targets

As announced on WWDC23 apps and SDKs will have to include a privacy manifest file, which can be added in Xcode 15 and will become mandatory in Spring 2024.

Apps and third-party SDKs — distributed as XCFrameworks, Swift packages, or framework bundles — can contain a privacy manifest file, named PrivacyInfo.xcprivacy. Source: Documentation

I'm still unsure how this reflects on apps or SDKs containing multiple targets, e.g. an app which contains network layer code in a separate target (but only as code included locally and not developed by some third party). Do we have to include a separate privacy manifest for each target or is it enough to have one privacy manifest in the "main" target that covers data usage of all targets.

Replies

The same question, I have both iPhone and iPad targets in the same project, with some differences in functionality and different third-party libraries. Can anyone answer it?

You should add a privacy manifest file to each target that builds an app or third-party SDK that collects data or uses required reason API. For instance, if your project contains seven targets but only two of them fall under the above guidelines, then you should add a privacy manifest only to each of these two targets. If the app that links against these targets doesn't fall under the above guidelines, then don't add a privacy manifest to it. If the app does, add a privacy manifest to the target building the app.

  • so if my third party SDK does not collect data or uses required reason API, i don't need to add privacy manifest file to my SDK. Am i correct ?

Add a Comment

you can use 'pod install --privacy' by cocoapods-privacy, it will auto create PrivacyInfo.xcprivacy file and search NSPrivacyAccessedAPITypes. https://github.com/ymoyao/cocoapods-privacy