Skip to content

Ship the privacy manifest in the app for the seven packages that have one - #46

Merged
MAUstaoglu merged 7 commits into
mainfrom
fix/privacy-manifests
Nov 24, 2026
Merged

MAUstaoglu merged 7 commits into
mainfrom
fix/privacy-manifests

Conversation

@MAUstaoglu

@MAUstaoglu MAUstaoglu commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

What does this PR do?

Fixes #24. The seven packages that ship a PrivacyInfo.xcprivacy did 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.swift through SwiftPM and leaves it out of the Podfile, so a podspec declaration never reaches the app for those. Built from main, an app with all seven packages contains no plugin privacy manifest at all, url_launcher_tvos included, although its podspec declares one.

  • SwiftPM packages (firebase_messaging_tvos, flutter_secure_storage_tvos, shared_preferences_tvos, url_launcher_tvos): the manifest moves from tvos/Resources/ to tvos/Classes/Resources/, because SwiftPM silently ignores resources outside the target directory. Package.swift gains resources: [.process("Resources")], and the podspec declares the same file in resource_bundles. In two podspecs source_files narrows to source extensions, so CocoaPods does not also compile the manifest.
  • Podspec-only packages (sqflite_tvos, video_player_tvos, wakelock_plus_tvos): the podspec gains resource_bundles.
  • The manifests' contents are unchanged and equal upstream's current ones.

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 main and from this branch; find <app> -name PrivacyInfo.xcprivacy on each result.

main this branch
SwiftPM path (what the CLI uses) no plugin manifest all seven
CocoaPods path (Package.swift removed from copies) url_launcher_tvos only all seven

Same result for a simulator debug build and an unsigned device release build.

  • Ran the package's example/ app
  • Verified on tvOS simulator: build only (Xcode 27.1); the app was not exercised
  • Verified on a physical Apple TV
  • dart analyze is clean for the package (all seven, with Flutter 3.50.0; CI uses 3.44.0)

Also: check_repo.py passes, flutter test passes in each package, pub publish --dry-run has 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

  • Bumped version: in each package's pubspec.yaml: sqflite, flutter_secure_storage, shared_preferences, firebase_messaging → 0.0.3; url_launcher, video_player, wakelock_plus → 0.0.2
  • Added a matching entry at the top of each CHANGELOG.md
  • No behaviour change for an app's code
  • Bug fix → patch

Merging this releases the seven packages: release_plan.py plans all seven tags.

Checklist

  • Only the seven packages' files are touched
  • No secrets, absolute local paths, or TODO/debug leftovers in the diff
  • No platform constraint involved
  • Sibling issues are noted below rather than fixed here

Notes for reviewers

  • Several of the Package.swift files 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 copies Resources/ to tvos/Resources/ and declares it in neither file. That is a follow-up in the CLI.
  • If one of the three podspec-only packages later gains a Package.swift, its manifest has to move into the target the same way.
  • Found on the way, not fixed: with wakelock_plus 1.8.0 or later an app that also uses wakelock_plus_tvos does not build, because upstream now declares a tvos platform itself. The test app pinned <1.8.0.

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.
@MAUstaoglu
MAUstaoglu requested a review from DenisovAV November 18, 2026 21:43

@DenisovAV DenisovAV left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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_plus 1.8.0 (2026-09-01), 1.8.1 and 1.8.2 all list
    tvos in flutter.plugin.platforms. The current release is 1.8.2 (2026-10-22).
  • wakelock_plus_tvos's pubspec depends on wakelock_plus_platform_interface: ^1.5.1 and 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. The find <app> -name PrivacyInfo.xcprivacy table 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 main and 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-package flutter test runs and pub publish --dry-run were 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.

@MAUstaoglu
MAUstaoglu merged commit e38d9b8 into main Nov 24, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants