Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 6d34044

Browse files
authored
Add xcprivacy privacy manifest to macOS framework (#55078)
Create a `PrivacyInfo.xcprivacy` (this name is required) plist and move it to the top-level of the macOS framework bundle. `NSPrivacyTracking*` and `NSPrivacyCollectedDataTypes` keys are required, but the values are blank. macOS explicitly does not need the `NSPrivacyAccessedAPITypes` (see more info in flutter/flutter#143381) You can see on this PR it's copied to the correct path in the framework https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8737163270670636097/+/u/Global_generators/Release-FlutterMacOS.framework/stdout: ``` adding: FlutterMacOS.xcframework/macos-arm64_x86_64/FlutterMacOS.framework/PrivacyInfo.xcprivacy (deflated 35%) ``` There's no way to test this except to submit a macOS app with this framework to TestFlight. I can't find a good spot in the engine to validate the structure of the framework output. I hereby pledge to add a macOS test to the framework post-roll flutter/flutter#155189 � iOS framework variant of this PR #48951 Fixes flutter/flutter#131494 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
1 parent 4d8d851 commit 6d34044

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

ci/licenses_golden/licenses_flutter

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47286,6 +47286,7 @@ FILE: ../../../flutter/shell/platform/darwin/macos/framework/Headers/FlutterPlug
4728647286
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Headers/FlutterPluginRegistrarMacOS.h
4728747287
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Headers/FlutterViewController.h
4728847288
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Info.plist
47289+
FILE: ../../../flutter/shell/platform/darwin/macos/framework/PrivacyInfo.xcprivacy
4728947290
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMac.h
4729047291
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMac.mm
4729147292
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMacTest.mm

shell/platform/darwin/macos/BUILD.gn

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,14 @@ copy("copy_framework_module_map") {
248248
outputs = [ "$_flutter_framework_dir/Versions/A/Modules/module.modulemap" ]
249249
}
250250

251+
# Copy privacy manifest. This file is required by Apple for third-party SDKs.
252+
# See https://developer.apple.com/documentation/bundleresources/privacy_manifest_files
253+
copy("copy_framework_privacy_manifest") {
254+
visibility = [ ":*" ]
255+
sources = [ "framework/PrivacyInfo.xcprivacy" ]
256+
outputs = [ "$_flutter_framework_dir/PrivacyInfo.xcprivacy" ]
257+
}
258+
251259
action("copy_framework_headers") {
252260
script = "//flutter/sky/tools/install_framework_headers.py"
253261
visibility = [ ":*" ]
@@ -304,6 +312,7 @@ action("_generate_symlinks") {
304312
":copy_framework_icu",
305313
":copy_framework_info_plist",
306314
":copy_framework_module_map",
315+
":copy_framework_privacy_manifest",
307316
":copy_license",
308317
]
309318
metadata = {
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>NSPrivacyTracking</key>
6+
<false/>
7+
<key>NSPrivacyTrackingDomains</key>
8+
<array/>
9+
<key>NSPrivacyCollectedDataTypes</key>
10+
<array/>
11+
</dict>
12+
</plist>

0 commit comments

Comments
 (0)