fix(darwin): ship PrivacyInfo.xcprivacy as a real file for SwiftPM#373
Merged
wang-bin merged 1 commit intoJun 28, 2026
Merged
Conversation
darwin/fvp/Resources/PrivacyInfo.xcprivacy was a symlink to ../../PrivacyInfo.xcprivacy, which points outside the SwiftPM package root (darwin/fvp). When a host app builds with Swift Package Manager, Flutter symlinks each plugin package into <app>/macos/Flutter/ephemeral/Packages/.packages/<pkg>. Xcode then resolves the resource's escaping symlink relative to that symlinked package location and looks for it at .packages/PrivacyInfo.xcprivacy, which does not exist: error: .../ephemeral/Packages/.packages/PrivacyInfo.xcprivacy: No such file or directory (in target 'fvp_fvp' from project 'fvp') so `flutter build macos`/`ios` fails for any app using SwiftPM. Source files under Sources/fvp are also symlinks but compile fine, because Xcode follows symlinks for compile inputs; only the .process resource copy phase breaks on the escaping link. Replace the symlink with a real copy of the manifest (the same pattern every first-party plugin uses, e.g. connectivity_plus ships a real PrivacyInfo.xcprivacy inside Sources/<target>). The CocoaPods path is unaffected: the podspec still references darwin/PrivacyInfo.xcprivacy.
Contributor
There was a problem hiding this comment.
Code Review
This pull request replaces a relative reference to PrivacyInfo.xcprivacy with a newly created, standard Apple privacy manifest file at darwin/fvp/Resources/PrivacyInfo.xcprivacy. The new manifest defines empty arrays for tracking domains, accessed API types, and collected data types, and sets tracking to false. There are no review comments, and I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #372.
darwin/fvp/Resources/PrivacyInfo.xcprivacyis a symlink to../../PrivacyInfo.xcprivacy, which points outside the SwiftPM package root(
darwin/fvp). The target declares it as a resource via.process("Resources/PrivacyInfo.xcprivacy").When a host app builds with Swift Package Manager enabled, Flutter symlinks each
plugin package into
<app>/macos/Flutter/ephemeral/Packages/.packages/<pkg>.Xcode then resolves the escaping resource symlink relative to that symlinked
location and looks for the file at
.packages/PrivacyInfo.xcprivacy(=
.packages/<pkg>/../PrivacyInfo.xcprivacy), which does not exist:so
flutter build macos/iosfails for any app on SwiftPM. (TheSources/fvp/*symlinks compile fine — Xcode follows symlinks for compileinputs; only the
.processresource-copy phase breaks on the escaping link.)Fix
Ship the manifest as a real file inside the package, matching the pattern
first-party plugins use (e.g.
connectivity_pluskeeps a realPrivacyInfo.xcprivacyunderSources/<target>/). The CocoaPods path isunchanged — the podspec still references
darwin/PrivacyInfo.xcprivacy.Verified
flutter build macos(Flutter 3.44.2, Xcode 26.5, SwiftPM enabled) nowcompletes and packages successfully; CocoaPods builds remain unaffected.