Privacy Manifests vs CocoaPods?

As of Xcode 15, Apple supports adding Privacy Manifests to SDKs. We develop an SDK that consists of several components (frameworks) for which we would like to add a Privacy Manifest. That works fine for our local builds, but we distribute our SDK via CocoaPods, which generates a single framework with the sources of all our components. This single framework currently does not have a Privacy Manifest.

How would we be able to provide Privacy Manifests when using CocoaPods for distribution?

Add a Comment

Replies

I believe we can do this: in the .podspec file of your CocoaPods, add xcprivacy to spec.source_files. For example, spec.source_files = 'Source/**/*.{h,m,swift,xcprivacy}'

After pod install, the .xcprivacy file is in both the pod directory and pod target.

  • My old answer was wrong. We should use spec.resource_bundles instead of spec.source_files, otherwise the SDK xcprivacy file might overwrite the xcprivacy file in the app bundle and cause problems.

  • Do the following to verify the PrivacyInfo.xcprivacy file is bundled correctly (see https://developer.apple.com/videos/play/wwdc2023/10060/?time=207)

    Make an archive build of the app.In the Xcode archives manager view, right click on the archive entry to show the context menu, then choose Generate Privacy Report and save the PDF file locally.Open the privacy report PDF. Look for the YourBundleName.bundle titles in it.
Add a Comment

We're already doing that to include the privacy manifest (PrivacyInfo.xcprivacy) in the sources we provide.

However, Xcode does not add this manifest into the (aggregated) privacy report, so App developers will (unfortunately) have to check this privacy manifest themselves (manually).

We're looking for a way to get the privacy manifest included in the privacy report, when using CocoaPods.

you can do like this via cocoapods spec.resource_bundles = {'PodName' => ['Source/*.xcprivacy']}

I had the same problem. Does the source code library require a privacy list, and how do I add it

Anyone has any idea on how to achieve this? Afnetworking is now listed but this is is now archived, how would one go about adding manifest file for this?

  • @LCTech Hi, are you figured it out ? We also use AFNetworking, and don’t know how to provide xcprivacy to them.

  • Hi, I have the same query, do you have any thoughts yet? Or is it possible to include Afnetworking's privacy list in your own main project?

  • Hi guys! Did anyone figure this out? I have also a project that depends on AFNetworking.

Add a Comment

The generated privacy report only includes nutrition labels from dynamics libraries and SDK resource bundles. If the privacy manifest file is in a static library instead of in a associated bundle, then the privacy report generator is not able to find it.

If the 3rd party SDK is integrated as source code and its privacy manifest is not in a bundle, then the SDK privacy manifest might overwrite the app privacy manifest in the product app package.

  • how to fix this?

Add a Comment