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:
@@ -18,6 +18,9 @@ const config: CapacitorConfig = {
|
||||
]
|
||||
}
|
||||
},
|
||||
PushNotifications: {
|
||||
presentationOptions: ['badge', 'sound', 'alert']
|
||||
},
|
||||
SplashScreen: {
|
||||
launchShowDuration: 3000,
|
||||
launchAutoHide: true,
|
||||
|
||||
Reference in New Issue
Block a user