mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
Firebase was only initialized lazily when the user toggled push on. On iOS the firebase_messaging plugin installs its APNs swizzling at app launch, but the delivered device token can only be forwarded to FCM if a FirebaseApp is already configured at that point. With lazy init there was none, so getAPNSToken() never resolved and enabling push failed with "Could not enable push". Add initFirebaseForPush() (mobile-only, idempotent) and call it from main() at launch. Extract a shared pushSupportedOnThisPlatform getter so isSupported and the initializer stay in sync; _ensureFirebase() now delegates to it as a safety net. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
frontend
A new Flutter project.