feat(firebase): tvOS support for firebase_remote_config - #10
feat(firebase): tvOS support for firebase_remote_config#10TheNoumanDev wants to merge 4 commits into
Conversation
DenisovAV
left a comment
There was a problem hiding this comment.
Review
Clean port. The repo gate passes on the merged tree, the native delta against upstream is minimal and necessary, and Remote Config genuinely works on tvOS including the part I most expected to be missing. One informational note at the end, no requests.
Port faithfulness
Diffed tvos/Classes/ against firebase_remote_config 6.5.3 as published. The whole delta is three mechanical hunks:
FirebaseRemoteConfigPlugin.swift— thecanImport(firebase_core)block replaced byimport firebase_core_tvos, and#elseif os(iOS)→#elseif (os(iOS) || os(tvOS))for the binary messenger.FirebaseRemoteConfigMessages.g.swift:9— the import gate, one line changed in 495.FirebaseRemoteConfigUtils.swiftandConstants.swift— identical.
No behavioral change anywhere, no stubs, no #if !TARGET_OS_TV. That is what makes the next rebase onto a new firebase_remote_config cheap, and it is the right instinct.
Real-time updates do work on tvOS
Worth stating with evidence, because it is the one Remote Config feature most likely to be quietly platform-gated and the README claims it.
FirebaseRemoteConfig.podspec at 12.15.0 declares tvos_deployment_target = '15.0', and RCNConfigRealtime.m — 754 lines carrying the whole SSE listener — contains zero platform guards. Its foreground reconnect hooks UIApplicationWillEnterForegroundNotification, which tvOS posts. The event-channel wiring in FirebaseRemoteConfigPlugin.swift is upstream's, intact.
One honest gap in the evidence rather than the code: the example exercises fetchAndActivate but not the realtime listener, so the "verified" claim covers fetch. The support claim itself holds per the SDK source.
Podspec
Firebase/RemoteConfig '~> 12.15.0' matches every sibling on main, tvOS 15.0 equals the pod's own floor, no Flutter CocoaPod dependency, static_framework. Upstream ships no privacy-manifest bundle for this package, so dropping resource_bundles loses nothing.
One note, not a request
On tvOS the SDK keeps RemoteConfig.sqlite3 somewhere different (RCNConfigDBManager.m):
#if TARGET_OS_TV
NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, ...);
#else
... NSApplicationSupportDirectory ...
#endifCaches is purgeable — the system may reclaim it under disk pressure, taking the activated config and the fetch-throttle metadata with it. An app that sets in-app defaults is fine; one that assumes "config was activated last launch, so it is still there" is not. Worth a sentence in the README's tvOS notes, since it is a behavioural difference from iOS that nothing else will surface.
LGTM.
|
Thanks for the review @DenisovAV! Added the tvOS Caches directory note to the README to address your point. Two things are on your side to finish this: the CI workflow shows "awaiting approval" (a maintainer needs to trigger the run), and I don't have merge permission on the repo, so it's ready to merge whenever you're able to approve the checks and land it. Thanks again for the thorough review! |
MAUstaoglu
left a comment
There was a problem hiding this comment.
Pigeon identical across 3.0.3 → 3.0.6, range is safe. The Caches-directory persistence note is worth having — that one would be a confusing bug report otherwise. LGTM.
PR description (continuous lines)
What does this PR do?
Adds federated
firebase_remote_config_tvos— Firebase Remote Config for Apple TV, built on the Firebase Apple SDK. Re-exports thefirebase_remote_configDart API and ships the native tvOSpluginClass; depends onfirebase_core_tvos. Full Remote Config API (defaults, fetch/activate/fetchAndActivate, typed getters, config settings, real-time updates), no feature disables.Package(s) touched:
firebase_remote_config_tvos(new)How was it tested?
Verified end-to-end on both the tvOS simulator and a physical Apple TV 4K (tvOS 26.2, release/AOT) against a live Firebase project.
FirebaseRemoteConfig 12.15.0initialized, a real fetch hitfirebaseremoteconfig.googleapis.com/.../namespaces/firebase:fetch, andfetchAndActivatereturnedactivated=truewithlastFetchStatus == RemoteConfigFetchStatus.success. A parameter published in the Firebase console was fetched and activated on the device — the on-deviceRemoteConfig.sqlite3(pulled viadevicectl) holds the console value in both the fetched and active tables, overriding the local default. No feature disables (Remote Config is UI-free).Platform.operatingSystem == "tvos"/Platform.isIOS == true.example/appRemoteConfigFetchStatus.success)RemoteConfig.sqlite3)dart analyzeis clean for the packageVersioning & changelog
version:set to0.0.1(new package)## 0.0.1entry at the top ofCHANGELOG.md0.x: initial0.0.1Checklist
firebase_remote_config_tvosfiles are touchedTODO/debug leftoversREADME.mddocuments tvOS behaviour (no feature limitations; version-alignment note)Notes for reviewers
_tvosleaf packages): the native code matchesfirebase_remote_config 6.5.3on thefirebase_core_platform_interface7.1.0 train (firebase_core 4.11.x). Mixingfirebase_core_tvoswith a differentfirebase_corewhoseFirebaseOptionslist differs can crash inCoreFirebaseOptions.fromListat launch (Dartoptions:init). 6.5.3 is the latest on this train — 6.5.6 requiresfirebase_core 4.13/ platform interface 8.1.Firebase/RemoteConfig+firebase_core_tvos, tvOS 15); Swiftfirebase_coreimport repointed tofirebase_core_tvos; generatedtvos/Package.swiftremoved (route via podspec); Dart re-export.