fix(firebase_core_tvos): regenerate Pigeon for the 14-element payload and drop the interface pin - #25
Conversation
… and drop the interface pin
|
@MAUstaoglu @DenisovAV — could you take a look? This is the last blocker before we can use the tvOS plugins in our app, now that it's on Flutter 3.47.1 with Once it's published, I'll follow up on |
MAUstaoglu
left a comment
There was a problem hiding this comment.
Thanks, this looks good. I diffed the three native files against firebase_core 4.13.0 and they match exactly. Nothing else in the repo still uses recaptchaSiteKey or the old makeWithApiKey: signature. A few small things:
- CHANGELOG is too long. Our entries are short and just say what changed (see 0.0.2). Please cut it to 3–4 lines: the regenerated Pigeon files, the new
^8.1.0constraint, and the new minimumfirebase_core. The history and release-note quotes fit better in the PR description. - Remove the "Breaking" label. Users on older
firebase_corestill resolve to 0.0.2, so nobody's build breaks. If it really were breaking, the version should go to 0.1.0 instead of 0.0.3. example/pubspec.yamlstill saysfirebase_core: ^4.11.0. Please bump it to^4.13.0so it matches the package.- Stale comments in other examples (can be a follow-up). Several examples still pin
firebase_core: 4.11.0with comments about the 15-field payload (analytics, ai, app_check, crashlytics, performance, remote_config, cloud_functions). They still resolve, but the comments will be out of date once this is published. - Please test on the simulator before we publish. Run the example with
flutter-tvos runon an Apple TV simulator and confirmFirebase.initializeApp(options: ...)returns without errors. Checking the payload length alone isn't enough.
About the ^8.1.0 range: I'm fine with it. If a future version adds a field at the end, our native code just ignores it. Only removing a field crashes, and that's rare enough that tracking upstream is worth it.
Review follow-ups on fluttertv#25: * Cut the 0.0.3 entry to what changed; the payload history and release-note detail live in the PR description. * Drop the "Breaking" label. Users on older firebase_core resolve to 0.0.2, so no build breaks. * Bump the example to firebase_core ^4.13.0 to match the package.
|
Hey @MAUstaoglu, updated PR with your points and also tested it against the simulator, works fine. |
The problem
firebase_core_platform_interface8.1.0 removedrecaptchaSiteKeyfromCoreFirebaseOptions, shortening the Pigeon payload:0.0.2 pinned to the 15-element window (
>=7.1.0 <8.1.0). That stopped the crash but froze the package below currentfirebase_core, which declares^8.1.0from 4.13.0 on. This regenerates instead, so the pin can go.Sources
firebase_core4.13.0 — the last release whose iOS implementation is still Objective-C (4.14.0 rewrote it in Swift), and the first on the 14-element payload.Diffed before copying; the delta is exclusively
recaptchaSiteKey— 18 lines inmessages.g.m, 7 inmessages.g.h, 3 inFLTFirebaseCorePlugin.m. Nothing tvOS-specific lived in them.Constraints
firebase_core_platform_interface: ^8.1.0, matching whatfirebase_coredeclares for itself. A closed window was considered and rejected: arity moved during one add/remove cycle — 7.1.0 addedrecaptchaSiteKeyfor reCAPTCHA support that was "gradually rolling out", 8.1.0 withdrew it when that moved to the provider API — across 23 published minor lines. If it moves againfirebase_corebreaks identically, so a caret keeps this package in step with upstream.firebase_core: ^4.13.0— earlier releases ship a native side expecting 15 elements.Verified
Payload arity: Dart
_toList14 entries ↔ nativefromList:indices 0–13 ↔ nativetoList14 entries.Not verified on hardware — measured at the protocol level, not observed as a working
Firebase.initializeApp(options: ...)on an Apple TV.Dependents and release order
The ten Firebase
_tvospackages declarefirebase_core_tvos: ^0.0.1, which admits 0.0.3 — no constraint bumps needed elsewhere.This must publish before
firebase_app_check_tvoscan be widened past itsfirebase_app_check: ">=0.4.5 <0.4.6"pin: 0.4.7 requiresfirebase_core ^4.14.0→interface ^8.1.1, which only resolves once 0.0.3 is out. That package also needs thegetTokenResulthandler and the 5thactivateargument noted on #18 — not in this PR.