-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Add PrivacyInfo.xcprivacy to plugin template #148485
Add PrivacyInfo.xcprivacy to plugin template #148485
Conversation
// reason APIs, update the PrivacyInfo.xcprivacy file to describe your plugin's privacy | ||
// impact, and then uncomment these lines. For more information, see | ||
// https://developer.apple.com/documentation/bundleresources/privacy_manifest_files | ||
// , resources: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is gross, but because the parameters are order-specific and trailing commas aren't allowed, I couldn't see any other option.
I tried using excludes
so this wouldn't be conditional at all, but that caused build failures for some reason (maybe due to everything being excluded?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could put the comment inside and just comment out the .process("Resources"),
line.
dependencies: [],
resources: [
// If your plugin requires a privacy manifest, for example if it uses any required
// reason APIs, update the PrivacyInfo.xcprivacy file to describe your plugin's privacy
// impact, and then uncomment these lines. For more information, see
// https://developer.apple.com/documentation/bundleresources/privacy_manifest_files
// .process("Resources"),
]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, the Resources
folder is also where images and other resource files go, the comment kind of seems like it's only used for privacy manifests.
Maybe change to something like
"If your plugin uses resource files or requires a privacy manifest, uncomment the line below. If your plugin does not require a privacy manifest, delete the PrivacyInfo.xcprivacy file provided in the Resources directory. If your plugin does requires a privacy manifest, for example if it uses any required reason APIs, update the PrivacyInfo.xcprivacy file to describe your plugin's privacy impact. For more information, see https://developer.apple.com/documentation/bundleresources/privacy_manifest_files"
Idk, that's kind of long, though. We could also put the privacy manifest in a different spot so it's independent of other Resources
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So hopefully it's a niche situation they would have anything else in resources. I don't have a preference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could put the comment inside and just comment out the
.process("Resources"),
line.
I thought I had tried that and gotten the same error as when I did exclude, but I must be misremembering since it works for me now.
Also, the
Resources
folder is also where images and other resource files go, the comment kind of seems like it's only used for privacy manifests.
Yes, I'd thought about that too, but when I had tried to make the comment cover everything it seemed like kind of a mess.
We could also put the privacy manifest in a different spot so it's independent of other Resources
Ooh, I like that. I hadn't considered that option; I'll set it up that way (and re-test to be sure it's working).
Do we want to keep the empty Resources
folder at that point? I would be tempted to just put a comment saying other files or directories could be added if they happened to need other resources, since I don't think it's common.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to unconditionally have resources:
, and moved the privacy manifest to a stand-alone file that is added to resources by a single commented-out line.
I also removed Resources
and just put a comment since:
- I think having other resources will be rare,
- there's now an example right there someone can refer to if they need to see how it works, and
- it completely avoids the whole .gitkeep issue with pub.
fyi @jmagman |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM whenever @vashworth is happy. Thanks for doing this!
(linked this PR to close #140013)
// reason APIs, update the PrivacyInfo.xcprivacy file to describe your plugin's privacy | ||
// impact, and then uncomment these lines. For more information, see | ||
// https://developer.apple.com/documentation/bundleresources/privacy_manifest_files | ||
// , resources: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So hopefully it's a niche situation they would have anything else in resources. I don't have a preference.
Adds an empty privacy manifest, and commented out code to include it in the build, to the plugin template. This will make it much easier to explain how to add a privacy manifest in plugin docs, since instead of explaining the format of the file from scratch and providing example code to inculde it, we can just instruct people to add entries to an exisitng file and then uncomment a line or two. This will also make it much easier to figure out from the template output itself how to add support for people who don't find the documentation. Part of flutter#131940
c9cb7d5
to
05dafe5
Compare
...ls/templates/plugin_swift_package_manager/ios-swift.tmpl/projectName.tmpl/Package.swift.tmpl
Outdated
Show resolved
Hide resolved
You may want to adjust your migration instruction comment to match this structure, just for consistency. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
flutter/flutter@0d22d91...00425ef 2024-05-17 engine-flutter-autoroll@skia.org Roll Flutter Engine from d575e511f9e5 to a19d3722922d (2 revisions) (flutter/flutter#148534) 2024-05-17 engine-flutter-autoroll@skia.org Roll Flutter Engine from 8d1a1d8d7b48 to d575e511f9e5 (5 revisions) (flutter/flutter#148529) 2024-05-17 engine-flutter-autoroll@skia.org Manual roll Flutter Engine from 6fa734d68688 to 8d1a1d8d7b48 (8 revisions) (flutter/flutter#148528) 2024-05-17 32538273+ValentinVignal@users.noreply.github.com Add test for material_banner.0.dart and material_banner.1.dart (flutter/flutter#148452) 2024-05-17 nate.w5687@gmail.com `switch` statement cleanup (flutter/flutter#148382) 2024-05-16 goderbauer@google.com const vs. non-const widget build benchmark (flutter/flutter#148261) 2024-05-16 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 4.1.5 to 4.1.6 (flutter/flutter#148516) 2024-05-16 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Roll Flutter Engine from 6fa734d68688 to 1850def2ccff (1 revision) (#148507)" (flutter/flutter#148517) 2024-05-16 stuartmorgan@google.com Add PrivacyInfo.xcprivacy to plugin template (flutter/flutter#148485) 2024-05-16 stuartmorgan@google.com Fix iOS reference in macOS Cocoapods error (flutter/flutter#148506) 2024-05-16 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6fa734d68688 to 1850def2ccff (1 revision) (flutter/flutter#148507) 2024-05-16 engine-flutter-autoroll@skia.org Roll Flutter Engine from 460df6caef0e to 6fa734d68688 (4 revisions) (flutter/flutter#148500) 2024-05-16 nate.w5687@gmail.com Enhanced enum features for `AnimationStatus` (flutter/flutter#147801) 2024-05-16 matej.knopp@gmail.com [macOS] codesign native assets during embed (flutter/flutter#148310) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC rmistry@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…r#6753) flutter/flutter@0d22d91...00425ef 2024-05-17 engine-flutter-autoroll@skia.org Roll Flutter Engine from d575e511f9e5 to a19d3722922d (2 revisions) (flutter/flutter#148534) 2024-05-17 engine-flutter-autoroll@skia.org Roll Flutter Engine from 8d1a1d8d7b48 to d575e511f9e5 (5 revisions) (flutter/flutter#148529) 2024-05-17 engine-flutter-autoroll@skia.org Manual roll Flutter Engine from 6fa734d68688 to 8d1a1d8d7b48 (8 revisions) (flutter/flutter#148528) 2024-05-17 32538273+ValentinVignal@users.noreply.github.com Add test for material_banner.0.dart and material_banner.1.dart (flutter/flutter#148452) 2024-05-17 nate.w5687@gmail.com `switch` statement cleanup (flutter/flutter#148382) 2024-05-16 goderbauer@google.com const vs. non-const widget build benchmark (flutter/flutter#148261) 2024-05-16 49699333+dependabot[bot]@users.noreply.github.com Bump actions/checkout from 4.1.5 to 4.1.6 (flutter/flutter#148516) 2024-05-16 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Roll Flutter Engine from 6fa734d68688 to 1850def2ccff (1 revision) (#148507)" (flutter/flutter#148517) 2024-05-16 stuartmorgan@google.com Add PrivacyInfo.xcprivacy to plugin template (flutter/flutter#148485) 2024-05-16 stuartmorgan@google.com Fix iOS reference in macOS Cocoapods error (flutter/flutter#148506) 2024-05-16 engine-flutter-autoroll@skia.org Roll Flutter Engine from 6fa734d68688 to 1850def2ccff (1 revision) (flutter/flutter#148507) 2024-05-16 engine-flutter-autoroll@skia.org Roll Flutter Engine from 460df6caef0e to 6fa734d68688 (4 revisions) (flutter/flutter#148500) 2024-05-16 nate.w5687@gmail.com Enhanced enum features for `AnimationStatus` (flutter/flutter#147801) 2024-05-16 matej.knopp@gmail.com [macOS] codesign native assets during embed (flutter/flutter#148310) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC rmistry@google.com,stuartmorgan@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Adds an empty privacy manifest, and commented out code to include it in the build, to the plugin template. This will make it much easier to explain how to add a privacy manifest in plugin docs, since instead of explaining the format of the file from scratch and providing example code to inculde it, we can just instruct people to add entries to an exisitng file and then uncomment a line or two. This will also make it much easier to figure out from the template output itself how to add support for people who don't find the documentation.
Part of #131940
Fixes #140013
Pre-launch Checklist
///
).