This document outlines how to set up and verify Firebase Cloud Messaging (FCM) for Paycif.
The app is connected to the project my-paysify-project.
- Android:
frontend/android/app/google-services.json - iOS:
frontend/ios/Runner/GoogleService-Info.plist - Flutter:
frontend/lib/firebase_options.dart(Contains platform-specific keys)
- Device Registration: Upon app launch, the
PushNotificationServicerequests permission and retrieves the FCM Token. - Token Sync: The token is automatically sent to the Supabase
profilestable in thefcm_tokencolumn. - Backend Trigger: When a transaction occurs, the Go
NotificationServicechecks the user's preferences:notification_transaction(Toggle from UI)fcm_token(Presence check)
- Push Dispatch: If authorized, a "Silent Push" is sent via Firebase Admin SDK.
User can manage their preferences in: Profile > Notifications
- Check Supabase logs for
FCM Token updated. - Verify
google-services.jsonis present before building for Android. - (iOS) Ensure "Push Notifications" capability is added in Xcode.