Repository navigation
Ship the privacy manifest in the app for the seven packages that have one - #46
Conversation
PrivacyInfo.xcprivacy was in tvos/Resources/ but the podspec did not declare it, so it never reached the app and an App Store upload could be rejected with ITMS-91061 (#24). Declare it in resource_bundles, named after upstream's <package>_privacy bundle.
PrivacyInfo.xcprivacy was in tvos/Resources/ but the podspec did not declare it, so it never reached the app and an App Store upload could be rejected with ITMS-91061 (#24). Declare it in resource_bundles, named after upstream's <package>_privacy bundle.
PrivacyInfo.xcprivacy was in tvos/Resources/ but the podspec did not declare it, so it never reached the app and an App Store upload could be rejected with ITMS-91061 (#24). Declare it in resource_bundles, named after upstream's <package>_privacy bundle.
…p, 0.0.3 PrivacyInfo.xcprivacy was in tvos/Resources/ but neither the podspec nor Package.swift declared it, so it never reached the app and an App Store upload could be rejected with ITMS-91061 (#24). SwiftPM only bundles resources inside the target directory, so it moves to tvos/Classes/Resources/, processed by Package.swift and bundled by the podspec's resource_bundles under upstream's bundle name. source_files narrows from Classes/**/* to the source extensions so CocoaPods does not also add the manifest to the Sources phase.
….0.3 PrivacyInfo.xcprivacy was in tvos/Resources/ but neither the podspec nor Package.swift declared it, so it never reached the app and an App Store upload could be rejected with ITMS-91061 (#24). SwiftPM only bundles resources inside the target directory, so it moves to tvos/Classes/Resources/, processed by Package.swift and bundled by the podspec's resource_bundles under upstream's bundle name. source_files narrows from Classes/**/* to the source extensions so CocoaPods does not also add the manifest to the Sources phase.
….0.3 PrivacyInfo.xcprivacy was in tvos/Resources/ but neither the podspec nor Package.swift declared it, so it never reached the app and an App Store upload could be rejected with ITMS-91061 (#24). SwiftPM only bundles resources inside the target directory, so it moves to tvos/Classes/Resources/, processed by Package.swift and bundled by the podspec's resource_bundles under upstream's bundle name.
The podspec bundled PrivacyInfo.xcprivacy, but flutter-tvos links any plugin that ships a tvos/Package.swift through SwiftPM, and that target declared no resources, so the app had no manifest. SwiftPM only bundles resources inside the target directory, so the manifest moves to tvos/Classes/Resources/, which Package.swift processes and the podspec now points at.
DenisovAV
left a comment
There was a problem hiding this comment.
PR Review: #46 — Ship the privacy manifest in the app for the seven packages that have one
Repo: fluttertv/plugins · Base: main · Closes: #24
Size: +102/−27 in 36 files · Merge state: CLEAN, no review yet
Note: merging releases all seven packages — release_plan.py plans seven tags
Verdict
Approve. The diagnosis is wider and better than the issue it closes, the mechanism is right on
both the SwiftPM and the CocoaPods path, and the before/after table is the kind of evidence this
change needed. One of the seven packages should not be released without a word of warning — see
finding 1 — but that is a line of text, not a reason to hold the other six.
What was checked and holds
The SwiftPM premise is exactly right. A SwiftPM target bundles only resources inside its own
path:. Every one of the four Package.swift targets declares path: "Classes", and the manifest
used to sit at tvos/Resources/ — one level above it. Nothing was misdeclared; the file was simply
invisible to SwiftPM. Moving it to tvos/Classes/Resources/ and declaring
resources: [.process("Resources")] is the only arrangement that works, and it explains why
url_launcher_tvos — whose podspec already declared the manifest — still shipped without one on the
path the CLI actually takes.
No file is listed as both a source and a resource. Checked all seven at the PR head:
| package | source_files |
resource_bundles path |
|---|---|---|
| firebase_messaging_tvos | Classes/**/*.{h,m,mm,swift} |
Classes/Resources/… |
| flutter_secure_storage_tvos | Classes/**/*.{h,m,mm,swift} |
Classes/Resources/… |
| shared_preferences_tvos | Classes/**/*.{h,m,mm,swift} |
Classes/Resources/… |
| url_launcher_tvos | Classes/**/*.swift |
Classes/Resources/… |
| sqflite_tvos | Classes/**/*.{h,m,mm,swift} |
Resources/… |
| video_player_tvos | Classes/**/*.{h,m,mm,swift} |
Resources/… |
| wakelock_plus_tvos | Classes/**/* |
Resources/… |
The three podspec-only packages keep the manifest outside Classes/, so wakelock_plus_tvos can
keep its broad Classes/**/* glob without picking it up. Consistent and correct.
The narrowed globs drop nothing. The two packages whose source_files went from Classes/**/*
to Classes/**/*.{h,m,mm,swift} contain only .swift, .m and .h files under Classes/, so
nothing stops being compiled.
Versions are in step. Every podspec's s.version matches its package's new version: — 0.0.3
for sqflite, flutter_secure_storage, shared_preferences and firebase_messaging, 0.0.2 for
url_launcher, video_player and wakelock_plus — and firebase_messaging_tvos also bumped
libraryVersion in Package.swift and the LIBRARY_VERSION preprocessor define in step. That is
better hygiene than the flutter_tvos package manages in flutter-tvos#107, where the podspec is
three releases stale.
Findings
1. wakelock_plus_tvos is superseded upstream, and this PR publishes a new version of it (important)
The PR's own closing note says that with wakelock_plus 1.8.0 or later an app that also uses
wakelock_plus_tvos does not build, because upstream declares a tvos platform itself, and that the
test app pinned <1.8.0. Checked on pub:
wakelock_plus1.8.0 (2026-09-01), 1.8.1 and 1.8.2 all list
tvosinflutter.plugin.platforms. The current release is 1.8.2 (2026-10-22).wakelock_plus_tvos's pubspec depends onwakelock_plus_platform_interface: ^1.5.1and not on
wakelock_plus, so pub cannot express or prevent the broken combination.
So for almost three months the default resolution of wakelock_plus has been one this package
cannot coexist with, and merging ships a 0.0.2 whose changelog talks only about a privacy manifest.
Anyone who picks it up on today's wakelock_plus gets a build failure, and nothing in the package
says why.
The other six are not in this position — I checked each upstream's latest release, and none of
firebase_messaging, flutter_secure_storage, shared_preferences, sqflite, url_launcher or
video_player declares tvos. This is specific to wakelock.
What I would do, in this PR: add one line to wakelock_plus_tvos's 0.0.2 changelog and README saying
it requires wakelock_plus below 1.8.0, since that text is being written here anyway. Then an issue
to decide the real answer — whether the package should be marked discontinued on pub now that
upstream covers tvOS, or kept for apps pinned to the older line.
2. Four naming styles for seven resource bundles (minor)
<name>_privacy—shared_preferences_tvos,sqflite_tvos,url_launcher_tvos,
video_player_tvos,wakelock_plus_tvos"#{s.module_name}_Privacy"—firebase_messaging_tvos(interpolated, capital P)- the bare pod name, no suffix —
flutter_secure_storage_tvos
Apple's scanner looks for PrivacyInfo.xcprivacy files in the built app and does not care what
bundle carries them, and the author's find run proves all seven arrive — so this is consistency,
not correctness. The one shape worth changing regardless is flutter_secure_storage_tvos: a resource
bundle named exactly like its pod produces flutter_secure_storage_tvos.bundle beside a
flutter_secure_storage_tvos.framework under use_frameworks!, which is the one configuration where
same-name artifacts have a history of colliding. Making all seven <name>_privacy costs two lines
and removes the question.
3. The narrow globs are a small future trap (nit)
Classes/**/*.{h,m,mm,swift} silently excludes .c, .cc and .cpp. Nothing in these packages
needs them today. If one of these ports ever grows a C file, the symptom will be a link error rather
than anything pointing at the podspec, so adding the C extensions now would be cheap insurance.
Not verified
- ITMS-91061 itself. No App Store Connect or TestFlight upload was made before or after, as the
PR says. Thefind <app> -name PrivacyInfo.xcprivacytable is good evidence that the manifests
reach the bundle, which is the mechanism behind the rejection, but not a demonstration that the
rejection stops. - The build matrix in the PR body (one app with all seven packages, built from
mainand from the
branch, SwiftPM and CocoaPods paths, simulator debug and unsigned device release) was taken as
reported; I did not rebuild it. check_repo.py, the per-packageflutter testruns andpub publish --dry-runwere reported
clean and not re-run here.- The manifests' contents are stated to equal upstream's current ones; I did not diff them against
each upstream package.
What does this PR do?
Fixes #24. The seven packages that ship a
PrivacyInfo.xcprivacydid not get it into the built app, so an upload can be rejected with ITMS-91061.It is wider than the report. flutter-tvos builds every plugin that has a
tvos/Package.swiftthrough SwiftPM and leaves it out of the Podfile, so a podspec declaration never reaches the app for those. Built frommain, an app with all seven packages contains no plugin privacy manifest at all,url_launcher_tvosincluded, although its podspec declares one.firebase_messaging_tvos,flutter_secure_storage_tvos,shared_preferences_tvos,url_launcher_tvos): the manifest moves fromtvos/Resources/totvos/Classes/Resources/, because SwiftPM silently ignores resources outside the target directory.Package.swiftgainsresources: [.process("Resources")], and the podspec declares the same file inresource_bundles. In two podspecssource_filesnarrows to source extensions, so CocoaPods does not also compile the manifest.sqflite_tvos,video_player_tvos,wakelock_plus_tvos): the podspec gainsresource_bundles.Package(s) touched: firebase_messaging_tvos, flutter_secure_storage_tvos, shared_preferences_tvos, sqflite_tvos, url_launcher_tvos, video_player_tvos, wakelock_plus_tvos
How was it tested?
One app depending on all seven packages, built with flutter-tvos 1.12.0 and the published 3.50.0 engine, Xcode 27.1, from
mainand from this branch;find <app> -name PrivacyInfo.xcprivacyon each result.mainPackage.swiftremoved from copies)url_launcher_tvosonlySame result for a simulator debug build and an unsigned device release build.
example/appdart analyzeis clean for the package (all seven, with Flutter 3.50.0; CI uses 3.44.0)Also:
check_repo.pypasses,flutter testpasses in each package,pub publish --dry-runhas 0 warnings and the archives contain the manifest.Not done: an App Store Connect or TestFlight upload, so ITMS-91061 itself was not observed before or after.
Versioning & changelog
version:in each package'spubspec.yaml: sqflite, flutter_secure_storage, shared_preferences, firebase_messaging → 0.0.3; url_launcher, video_player, wakelock_plus → 0.0.2CHANGELOG.mdMerging this releases the seven packages:
release_plan.pyplans all seven tags.Checklist
TODO/debug leftovers in the diffNotes for reviewers
Package.swiftfiles say they are generated and not to be edited by hand. They are edited here, because the generator (flutter-tvos plugin port) has the same gap: it copiesResources/totvos/Resources/and declares it in neither file. That is a follow-up in the CLI.Package.swift, its manifest has to move into the target the same way.wakelock_plus1.8.0 or later an app that also useswakelock_plus_tvosdoes not build, because upstream now declares atvosplatform itself. The test app pinned<1.8.0.