ShaunSocial mobile app guide 1.5.6 / Your app
Push notifications
The ShaunSocial app receives push notifications through Google Firebase, on Android and on iPhones. This page explains how to create the Firebase project, connect your app to it, let Firebase reach iPhones, and give your site the key it sends notifications with. The app needs Firebase even to start, so do this before your first test build.
How push notifications reach the apps#
Last updated: 2026-11-19 · v1.5.6
- When the app starts, it connects to your Firebase project and asks the member to allow notifications.
- If the member allows them, Firebase gives this phone an address for notifications, and the app sends it to your site once the member is signed in.
- When something happens for that member (a message, a comment, a new follower and so on), your site hands the notification to Firebase with your project's key, and Firebase delivers it. For iPhones, Firebase passes it on to Apple's push service, which is why Firebase needs a key from your Apple account.
So three things must belong to the same Firebase project: the app's Firebase files, the Apple key uploaded to Firebase, and the key file on your server. If your website already sends browser notifications through Firebase, use that same project.
| Step | Who |
|---|---|
| Create the Firebase project | Admin |
| Add the Android and iOS apps and put their files into the app | Developer |
| Create the Apple push key and upload it to Firebase | Admin |
| Put the service-account key file on the server | Admin, with the server administrator |
| Test on real phones | Developer |
Incoming calls on iPhones (with a calling plugin) are delivered by Apple directly, not through Firebase, and have their own AdminCP settings (see Incoming calls on iPhones).
The app's behaviour on this page was read from the code of the ShaunSocial app 1.5.6. The steps in the Firebase console, on the Apple Developer website and with the command-line tools were not run for this guide, and those tools rename their menus from time to time: look for the same words if a menu is named a little differently.
Create the Firebase project#
Last updated: 2026-11-19 · v1.5.6
- Sign in to the Firebase console with the Google account that should own the project, and click Create a project (or open the project your website's browser notifications already use).
- Give it a name, for example your community's name. Google Analytics is optional; the app does not need it.
- Add the Developer to the project: Project settings → Users and permissions → Add member, with the role Editor.
Sending push notifications through Firebase is free.
Add the apps and their Firebase files#
Last updated: 2026-11-19 · v1.5.6
In the source package the app's Firebase files are empty. Until you fill them, the app does not get past its start screen. The simplest way to fill them is the FlutterFire command-line tool, which registers your Android and iOS apps in the Firebase project and writes all the files in one go.
- First give the app its own package name and bundle ID (see App name, package name and bundle ID): Firebase registers the apps under these names.
- Install the Firebase command-line tool, sign in, and install FlutterFire:
npm install -g firebase-tools firebase login dart pub global activate flutterfire_cli - In the
shaun_appfolder run:
Choose your Firebase project and the platforms android and ios. When it asks, confirm your package name and bundle ID.flutterfire configureWhat you should see: the tool lists the apps it registered and the files it wrote.
| File | What it is |
|---|---|
shaun_app/lib/firebase_options.dart | the settings the app reads when it starts, for both platforms |
shaun_app/android/app/google-services.json | the Android app's Firebase file |
shaun_app/ios/Runner/GoogleService-Info.plist | the iOS app's Firebase file |
shaun_app/ios/firebase_app_id_file.json | the iOS app's Firebase app ID |
You can also add the apps by hand in the Firebase console (Project settings → Your apps → Add
app), download the two platform files into the places above, and fill in firebase_options.dart with the
values Firebase shows. Run flutterfire configure again whenever you change the package name or bundle
ID.
They identify your Firebase project. Do not copy them from another app, and do not share them outside your team.
Let Firebase reach iPhones (the APNs key)#
Last updated: 2026-11-19 · v1.5.6
Apple delivers every notification to an iPhone itself, through its push service (APNs). Firebase can hand notifications to Apple only with a key from your Apple Developer account.
- On the Apple Developer website open Certificates, Identifiers & Profiles → Keys and add a key with Apple Push Notifications service (APNs) ticked.
- Download the
.p8file. Apple lets you download it only once: keep it somewhere safe and private. Note the key's Key ID and your Team ID (shown in your membership details). - In the Firebase console open Project settings → Cloud Messaging → Apple app
configuration, choose your iOS app, and under APNs Authentication Key click Upload: select the
.p8file and enter the Key ID and Team ID.
One APNs key works for all the apps of your Apple team. The same key can also go into the AdminCP for incoming calls on iPhones (see Incoming calls on iPhones). It is not the In-App Purchase key (see iOS: the In-App Purchase key).
The app project already has the push capability and background notifications switched on; with automatic signing, Xcode enables push for your bundle ID by itself (see Sign the iOS app).
The notification icon on Android#
Last updated: 2026-11-19 · v1.5.6
Android shows a small icon next to each notification. The app uses notification.png in each
mipmap-… folder of shaun_app/android/app/src/main/res/, tinted with
launcher_background_color from values/colors.xml. Replace the pictures with your own at the same
sizes. Android draws only the shape of this icon, so use a white shape on a transparent background; a full-colour picture
shows as a plain square.
Your site's side: the service-account key#
Last updated: 2026-11-19 · v1.5.6
There is no AdminCP field for app notifications. Your site sends them with the service-account key of your Firebase project, a file that sits on the server:
- In the Firebase console open Project settings → Service accounts and click Generate new private key. A file downloads. Keep it private: it lets anyone send notifications in your name.
- Give it to your server administrator, who saves it as
firebase.jsonin the site folder. Where exactly, and how, is in the server box of Set up browser notifications in the ShaunSocial guide: browser and app notifications use the same file.
The key must come from the same Firebase project as the app's Firebase files; a key from another project cannot reach your members' phones. The Firebase json and Firebase key pair fields in the AdminCP are for browser notifications on your website only; the app does not need them.
Send a test notification#
Last updated: 2026-11-19 · v1.5.6
- Install the app on a real Android phone and a real iPhone (for the iPhone, a TestFlight build or a build run from Xcode). Open it, allow notifications when it asks, and sign in as a member.
- Put the app in the background. From the website, signed in as another member, follow the test member or send them a
message.
What you should see: a notification on both phones.
- To reach every signed-in app user at once, the Admin can use AdminCP → Mobile Application → Broadcast Message (see Broadcast Message).
When notifications do not arrive#
Last updated: 2026-11-19 · v1.5.6
| What you see | Likely cause |
|---|---|
| The app does not get past its start screen | the Firebase files are still empty or belong to an app with another package name or bundle ID; run flutterfire configure again (see Add the apps and their Firebase files) |
| Broadcast Message answers "Please config google firebase server key." | the firebase.json key file is missing on the server (see Your site's side); without it no app receives notifications |
| No notifications on any phone, although the key file is there | the key file comes from a different Firebase project than the app's Firebase files |
| Android phones get notifications, iPhones do not | the APNs key is not uploaded to Firebase, or the Key ID or Team ID is wrong (see Let Firebase reach iPhones) |
| One member gets nothing | they did not allow notifications; they can switch them on in the phone's settings for your app, then open the app again |
| The notification icon on Android is a grey or white square | the notification icon is a full-colour picture (see The notification icon on Android) |
Change log#
Last updated: 2026-11-19 · v1.5.6
| Date (GMT+7) | Section | What changed |
|---|---|---|
| 2026-11-19 | all | First version for the ShaunSocial app 1.5.6, written from the 1.5.6 code. The steps in the Firebase console, on the Apple Developer website and with the command-line tools were not run for this guide. |
| 2026-11-19 | apns-key | Links updated after the In-app purchases page was split by platform: Android and iOS have their own pages. |