feat(notifications): initialize Firebase Messaging and Capacitor push on native

Add firebaseMessagingClient to ensure the Firebase app is created from VITE_FIREBASE_*,
wire PushNotifications (listeners, requestPermissions, register) before token work,
and call getMessaging/getToken/onMessage when firebase/messaging is supported. Hook
startup from main.capacitor and set PushNotifications presentationOptions in
capacitor.config. Depend on firebase and @capacitor/push-notifications.
This commit is contained in:
Jose Olarte III
2026-05-06 15:30:46 +08:00
parent 1643bab18b
commit 162158066f
12 changed files with 2983 additions and 1278 deletions

View File

@@ -18,6 +18,9 @@ const config: CapacitorConfig = {
]
}
},
PushNotifications: {
presentationOptions: ['badge', 'sound', 'alert']
},
SplashScreen: {
launchShowDuration: 3000,
launchAutoHide: true,