In a delivery or ride-hailing platform, push notifications are part of the product. A store that doesn't hear a new order, or a driver who misses a trip request, costs you money. Firebase Cloud Messaging (FCM) delivers those notifications in 6amTech apps. Here's how we set it up and where it usually breaks.
The pieces involved
- A Firebase project owned by you. Never reuse the demo project from the script.
- App registrations in that project: one Android app and one iOS app for each mobile app (customer, store or provider, driver or delivery man).
- Config files in each Flutter app:
google-services.jsonfor Android andGoogleService-Info.plistfor iOS. - Server credentials in the admin panel, so the backend can send messages.
- For iOS, an APNs authentication key uploaded to Firebase.
Step 1: create the Firebase project
Create one Firebase project per platform, for example "YourBrand Delivery". Register each app with its final package name or bundle ID. These must match the identifiers in your rebranded apps exactly. If you change package names later, you'll have to register again and download new config files, so finish rebranding first.
Step 2: add the config files to each app
Download google-services.json for each Android app and place it in the app's Android module, replacing the demo file. Download GoogleService-Info.plist for each iOS app and add it to the Runner target in Xcode. Adding the file through Xcode, rather than just copying it into the folder, makes sure it's included in the build.
Step 3: server credentials in the admin panel
Google retired the old FCM "legacy server key" API in favour of the FCM HTTP v1 API, which authenticates with a service account. Recent 6amTech versions use HTTP v1. In Firebase, go to Project settings → Service accounts and generate a private key. You'll get a JSON file. Paste its content, or the requested values, into the admin panel's Firebase or notification settings as your version's docs describe.
Treat that JSON like a password. Don't email it around or commit it to a public repository.
If you're on an older script version that still asks for a legacy server key, notifications will stop working. That's a strong reason to update your platform.
Step 4: iOS needs APNs
On iOS, Firebase delivers through Apple Push Notification service. In your Apple Developer account, create an APNs authentication key (.p8), note the Key ID and Team ID, and upload them in Firebase under Cloud Messaging for each iOS app. Then, in Xcode, enable the Push Notifications capability and Background Modes → Remote notifications for each app.
Step 5: test on real devices
The iOS simulator isn't a reliable test for push. Use real phones and test:
- A new order notification to the store app.
- A delivery request to the delivery-man app, or a trip request to the driver app.
- Order status updates to the customer.
- A manual push campaign from the admin panel.
Test with the app in the foreground, in the background and fully closed.
Why notifications fail, and the fixes
- Package name mismatch. The app's identifier doesn't match the Firebase registration. Check
applicationIdand the bundle ID. - Old config files. The build still contains the demo
google-services.json. - Wrong server credentials. The service account belongs to a different Firebase project than the apps.
- Missing APNs key. Android works but iOS is silent. Upload the APNs key and check the capabilities.
- Battery optimisation. Some Android manufacturers aggressively kill background apps. Ask stores and drivers to exclude your app from battery optimisation, and include the steps in your onboarding.
- Notification permission. Android 13 and later, and iOS, require the user to allow notifications. Make sure the app asks at a sensible moment.
- Missing cron or queue. Some notifications are sent by scheduled or queued jobs. If cron or the queue worker isn't running, they never go out. See the server guide.
Sound and priority for order alerts
Store and driver apps should make it obvious when an order arrives. Check that order notifications use the custom sound and high-priority channel the app defines, and test with the phone on vibrate.
Notification templates and languages
Once delivery works, check what the notifications actually say. 6amTech admin panels let you edit notification messages for order events, so rewrite them in your brand's voice and in every language you support. Short, specific messages ("Order #1042 accepted, arriving in about 30 minutes") work better than generic ones. If you serve Arabic-speaking users, check how mixed Arabic and English text displays on both platforms.
For marketing pushes from the admin panel, send sparingly. Users who get too many promotional notifications turn them off entirely, and then they also miss the order updates that matter.
How we help
Firebase and push setup is included in every installation we do. Our food delivery and ride-hailing platforms are only handed over after notifications are tested on real devices for every app.
Questions
Why are push notifications not working in my 6amMart app?
The most common causes are mismatched package names, demo config files left in the build, server credentials from a different Firebase project, or a missing APNs key on iOS.
Do I need a separate Firebase project for each app?
No. One Firebase project per platform is typical, with each Android and iOS app registered inside it.
What is FCM HTTP v1?
It's the current Firebase Cloud Messaging API, which authenticates with a service account instead of the retired legacy server key.
Why do notifications work on Android but not iOS?
Usually the APNs authentication key hasn't been uploaded to Firebase, or the Push Notifications capability isn't enabled in Xcode.