weichsel / ZIPFoundation

Effortless ZIP Handling in Swift
MIT License
2.34k stars 263 forks source link

Privacy Manifest #285

Closed mateusforgi closed 1 year ago

mateusforgi commented 1 year ago

Is your feature request related to a problem? Please describe. Apple has announced the Privacy Manifest, required by apps and SDKs.

Third-party SDKs need to provide their own privacy manifest files that record the types of data they collect. Your app’s privacy manifest file doesn’t need to cover data collected by third-party SDKs that your app links to.

Describe the solution you'd like When are you guys planning to include it?

weichsel commented 1 year ago

Done. The manifest is now available in development and will be part of the next release.
A "ZIPFoundation" section should show up in your privacy report if your main target already contains a privacy manifest. (Use "Generate privacy report" in the Xcode Organizer).

Let me know how it goes.

mateusforgi commented 1 year ago

@weichsel looks good, but do we need to copy PrivacyInfo.xcprivacy to the resources folder? The documentation does not mention where to put it. I was assuming it should go to the same level o Package.swift.

weichsel commented 1 year ago

This doc says:

For example, put all resource files into a directory named Resources, resulting in all of your resource files residing at Sources/MyLibrary/Resources.

mateusforgi commented 1 year ago

@weichsel yes, but until now it was for resource files used in the Package bundle. XCode is not combining the privacy manifests on my tests as described in the paragraph below either adding it as resource or not, it only takes into account the privacy manifest of the main app.

First, to help developers understand how third-party SDKs use data, we’re introducing new privacy manifests — files that outline the privacy practices of the third-party code in an app, in a single standard format. When developers prepare to distribute their app, Xcode will combine the privacy manifests across all the third-party SDKs that a developer is using into a single, easy-to-use report. With one comprehensive report that summarizes all the third-party SDKs found in an app, it will be even easier for developers to create more accurate Privacy Nutrition Labels.

weichsel commented 1 year ago

I recently adopted Privacy Manifests for a client project and the Privacy Report in Xcode 15 picked up the manifest in the ZIPFoundation dependency. (Integrated via Xcode SPM support). How's your setup? (Did you point your dependency to the development branch of ZIPFoundation. There's no release yet that includes this change)

mateusforgi commented 1 year ago

@weichsel now it is generating the privacy report correctly, it was a folder mistake I made from my side. Thanks for the support!