Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CP-stable]Add xcprivacy privacy manifest to macOS framework #55366

Conversation

flutteractionsbot
Copy link

@flutteractionsbot flutteractionsbot commented Sep 23, 2024

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?

  • Low
  • Medium
  • High

Test Coverage:

Are you confident that your fix is well-tested by automated tests?

  • Yes
  • No

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.

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 flutter#48951
Fixes flutter/flutter#131494

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
@flutteractionsbot flutteractionsbot added the cp: review add the cp request to the review queue of release engineers label Sep 23, 2024
@flutteractionsbot
Copy link
Author

@jmagman please fill out the PR description above, afterwards the release team will review this request.

Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM to cherry pick.

shell/platform/darwin/macos/BUILD.gn Outdated Show resolved Hide resolved
@jmagman jmagman requested a review from cbracken October 23, 2024 18:44
@reidbaker reidbaker added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 23, 2024
@auto-submit auto-submit bot merged commit db49896 into flutter:flutter-3.24-candidate.0 Oct 23, 2024
26 checks passed
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Oct 24, 2024
#155556)

This is the framework-side test for flutter/engine#55366.  This test will fail unless it is run on a roll containing that fix.

### Issue Link:
#154915

### Changelog Description:
Test that a built macOS app contains the FlutterMacOS framework privacy manifest and validates flutter/engine#55366.

### Impact Description:
Adds confidence the Flutter macOS engine framework contains the expected privacy manifest at the right path.

### Workaround:
N/A

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
Run the flutter_tool tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: desktop autosubmit Merge PR when tree becomes green via auto submit App cp: review add the cp request to the review queue of release engineers platform-macos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants