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

@@ -148,6 +148,7 @@
"@capacitor/core": "^6.2.0",
"@capacitor/filesystem": "^6.0.0",
"@capacitor/ios": "^6.2.0",
"@capacitor/push-notifications": "^6.0.5",
"@capacitor/share": "^6.0.3",
"@capacitor/status-bar": "^6.0.2",
"@capawesome/capacitor-file-picker": "^6.2.0",
@@ -194,6 +195,7 @@
"electron-builder": "^26.0.12",
"ethereum-cryptography": "^2.1.3",
"ethereumjs-util": "^7.1.5",
"firebase": "^12.12.1",
"jdenticon": "^3.2.0",
"js-generate-password": "^0.1.9",
"js-yaml": "^4.1.0",