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

Commit db49896

Browse files
[CP-stable]Add xcprivacy privacy manifest to macOS framework (#55366)
### Issue Link: flutter/flutter#154915 ### Changelog Description: Comply with the new Apple privacy manifest policy for the macOS Flutter engine framework and prevent the "Missing privacy manifest" warning when submitting a macOS app to the App Store. ### Impact Description: The macOS App Store will start enforcing privacy manifests for third-party SDKs starting November 12, 2024. This change adds an empty privacy manifest to the Flutter engine FlutterMacOS.framework to comply with this new policy and prevents the warning. ### Workaround: Add an empty PrivacyInfo.xcprivacy plist to FlutterMacOS.framework and re-codesign it manually. ### Risk: What is the risk level of this cherry-pick? ### Test Coverage: Are you confident that your fix is well-tested by automated tests? A test was added to the framework, which should also be cherry-picked flutter/flutter#155556. While we can confirm the expected file is present, only a TestFlight/App Store submission will confirm the warning is gone. ### Validation Steps: Submit a Flutter macOS app to TestFlight or the App Store. Confirm there is no submission warning email sent.
1 parent b19d438 commit db49896

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

ci/licenses_golden/licenses_flutter

+1
Original file line numberDiff line numberDiff line change
@@ -46536,6 +46536,7 @@ FILE: ../../../flutter/shell/platform/darwin/macos/framework/Headers/FlutterPlug
4653646536
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Headers/FlutterPluginRegistrarMacOS.h
4653746537
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Headers/FlutterViewController.h
4653846538
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Info.plist
46539+
FILE: ../../../flutter/shell/platform/darwin/macos/framework/PrivacyInfo.xcprivacy
4653946540
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMac.h
4654046541
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMac.mm
4654146542
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMacTest.mm

shell/platform/darwin/macos/BUILD.gn

+10
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,15 @@ 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 =
257+
[ "$_flutter_framework_dir/Versions/A/Resources/PrivacyInfo.xcprivacy" ]
258+
}
259+
251260
action("copy_framework_headers") {
252261
script = "//flutter/sky/tools/install_framework_headers.py"
253262
visibility = [ ":*" ]
@@ -304,6 +313,7 @@ action("_generate_symlinks") {
304313
":copy_framework_icu",
305314
":copy_framework_info_plist",
306315
":copy_framework_module_map",
316+
":copy_framework_privacy_manifest",
307317
":copy_license",
308318
]
309319
metadata = {
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)