Add xcprivacy privacy manifest to macOS framework (flutter/engine#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 https://github.com/flutter/flutter/issues/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 https://github.com/flutter/flutter/pull/155189 â iOS framework variant of this PR https://github.com/flutter/engine/pull/48951 Fixes https://github.com/flutter/flutter/issues/131494 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
@@ -47286,6 +47286,7 @@ FILE: ../../../flutter/shell/platform/darwin/macos/framework/Headers/FlutterPlug
|
||||
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Headers/FlutterPluginRegistrarMacOS.h
|
||||
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Headers/FlutterViewController.h
|
||||
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Info.plist
|
||||
FILE: ../../../flutter/shell/platform/darwin/macos/framework/PrivacyInfo.xcprivacy
|
||||
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMac.h
|
||||
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMac.mm
|
||||
FILE: ../../../flutter/shell/platform/darwin/macos/framework/Source/AccessibilityBridgeMacTest.mm
|
||||
|
||||
@@ -248,6 +248,14 @@ copy("copy_framework_module_map") {
|
||||
outputs = [ "$_flutter_framework_dir/Versions/A/Modules/module.modulemap" ]
|
||||
}
|
||||
|
||||
# Copy privacy manifest. This file is required by Apple for third-party SDKs.
|
||||
# See https://developer.apple.com/documentation/bundleresources/privacy_manifest_files
|
||||
copy("copy_framework_privacy_manifest") {
|
||||
visibility = [ ":*" ]
|
||||
sources = [ "framework/PrivacyInfo.xcprivacy" ]
|
||||
outputs = [ "$_flutter_framework_dir/PrivacyInfo.xcprivacy" ]
|
||||
}
|
||||
|
||||
action("copy_framework_headers") {
|
||||
script = "//flutter/sky/tools/install_framework_headers.py"
|
||||
visibility = [ ":*" ]
|
||||
@@ -304,6 +312,7 @@ action("_generate_symlinks") {
|
||||
":copy_framework_icu",
|
||||
":copy_framework_info_plist",
|
||||
":copy_framework_module_map",
|
||||
":copy_framework_privacy_manifest",
|
||||
":copy_license",
|
||||
]
|
||||
metadata = {
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>NSPrivacyTracking</key>
|
||||
<false/>
|
||||
<key>NSPrivacyTrackingDomains</key>
|
||||
<array/>
|
||||
<key>NSPrivacyCollectedDataTypes</key>
|
||||
<array/>
|
||||
</dict>
|
||||
</plist>
|
||||
Reference in New Issue
Block a user