flutter / website

Flutter documentation web site
https://docs.flutter.dev
Other
2.76k stars 3.18k forks source link

Add Apple privacy manifest instructions for plugin authors #10864

Closed jmagman closed 2 days ago

jmagman commented 1 week ago

What information needs to be added?

Apple introduced the concept privacy manifests:

Apps and third-party SDKs — distributed as XCFrameworks, Swift packages, or Xcode projects — can contain a privacy manifest file, named PrivacyInfo.xcprivacy. The privacy manifest is a property list that records the following information:

The types of data collected by your app or third-party SDK. You need to provide this information for your app or third-party SDK on all platforms.

The required reasons APIs your app or third-party SDK uses. You need to provide this information for your app or third-party SDK on iOS, iPadOS, tvOS, visionOS, and watchOS.

For each type of data your app or third-party SDK collects and category of required reasons API it uses, the app or third-party SDK needs to record the reasons in its bundled privacy manifest file.

See https://github.com/flutter/flutter/issues/143232.

We should add instructions for how plugin authors can add a privacy manifest to their CocoaPods podspec, if their plugin requires it due to data collection for using a "required reasons API".

Where should this new content appear?

Flutter will be swapping from CocoaPods to Swift Package Manager for iOS and macOS native dependency management. The new docs PR (https://github.com/flutter/website/pull/10827) already include instructions for plugin authors to add a privacy manifest to the Swift package, if needed.

Add a similar note to https://docs.flutter.dev/packages-and-plugins/developing-packages#add-cocoapod-dependencies.

Example at https://github.com/flutter/packages/blob/9627de9141f57e4c11eac0caf671d70ef1b8abcf/packages/shared_preferences/shared_preferences_foundation/darwin/shared_preferences_foundation.podspec#L26

  s.resource_bundles = {'shared_preferences_foundation_privacy' => ['shared_preferences_foundation/Sources/shared_preferences_foundation/Resources/PrivacyInfo.xcprivacy']}

https://github.com/flutter/flutter/issues/131940#issuecomment-2070301947

I would like to fix this problem.

jmagman commented 1 week ago

cc @sfshaza2 per your comment https://github.com/flutter/flutter/issues/143232#issuecomment-2192871228