For the complete documentation index, see llms.txt. This page is also available as Markdown.

Firebase Setup

Create a Firebase project and generate the three files Twinr needs for push notifications and analytics.

Push notifications and Firebase Analytics both run on Firebase, Google's app platform. Setting it up means creating one project and generating up to three files from it.

You do this once. The files are shared across features — upload a file under Push and it appears as already uploaded under Analytics, and the other way round.

What you will generate

File
Platform
Needed for

google-services.json

Android

Push notifications, Firebase Analytics

GoogleService-Info.plist

iOS

Push notifications, Firebase Analytics

Service account key

Both

Push campaigns sent from Engage

Google Sign-In does not use these files. It needs three OAuth client IDs from Google Cloud Console instead — see Google Sign-In.

Before you begin

Firebase needs your app's identifiers, and they must match Twinr exactly.

You need
Where to find it

Both look like com.yourcompany.yourapp.


1. Create a Firebase project

1

Open the Firebase console

Go to console.firebase.google.com and sign in with a Google account.

Use a company account rather than a personal one. This project holds your app's messaging and analytics; if it sits in an individual's account and they leave, recovering it is difficult.

2

Create the project

Click Create a project, enter a name — your app's name is the obvious choice — and continue.

3

Choose whether to enable Google Analytics

Firebase offers Google Analytics during setup.

Enable it if you plan to use Firebase Analytics. Skip it if you only want push notifications — you can turn it on later.

4

Open Project settings

Once the project is created, click the gear icon beside Project Overview and choose Project settings.

This is where every file in this guide comes from.


2. Create the Android file

google-services.json connects your Android app to the Firebase project.

1

Add an Android app

In Project settings, scroll to Your apps and click the Android icon.

2

Enter your package name

Field
What to enter

Android package name

Your Twinr Android package name, pasted exactly.

App nickname

Optional. A label used only inside Firebase.

Debug signing certificate SHA-1

Leave empty. Twinr does not require it.

Click Register app.

3

Download google-services.json

Click Download google-services.json.

Firebase then shows SDK installation instructions. Skip them — they are for developers adding Firebase to code by hand. Twinr handles that for you.

4

Upload it to Twinr

Open Push → Firebase Notifications or Analytics → Firebase Analytics, click Upload google-services.json, then Save as draft.


3. Create the iOS file

GoogleService-Info.plist connects your iOS app to the same Firebase project.

1

Add an iOS app

In Project settings → Your apps, click the iOS+ icon.

2

Enter your bundle ID

Field
What to enter

Apple bundle ID

Your Twinr iOS bundle ID, pasted exactly.

App nickname

Optional. A label used only inside Firebase.

App Store ID

Leave empty. It is not needed here.

Click Register app.

3

Download GoogleService-Info.plist

Click Download GoogleService-Info.plist.

Skip the Xcode and SDK steps that follow.

4

Upload it to Twinr

Open Push → Firebase Notifications or Analytics → Firebase Analytics, click Upload GoogleService-Info.plist, then Save as draft.


4. Create the service account key

The two config files let your app receive notifications. Sending campaigns from Engage needs one more file: a service account key, which authorises Twinr to send on your behalf.

Only required if you run push campaigns from Engage. Push notifications you send yourself from the Firebase console work without it.

1

Open the Service accounts tab

In Project settings, select the Service accounts tab.

2

Generate a private key

Click Generate new private key, then confirm.

A .json file downloads immediately.

3

Store it safely

4

Upload it to Twinr

Open Push → Firebase Notifications, click Upload secret key under Firebase secret key, then Save as draft.

If Twinr rejects the file, it is not a valid service account key — generate a fresh one rather than reusing google-services.json, which is a different file.


Where the files are used

Frequently asked questions

Do I need a paid Firebase plan?

No. The free Spark plan covers push notifications and analytics for most apps.

I already uploaded a file for one feature. Do I upload it again for the other?

No. google-services.json and GoogleService-Info.plist are shared. Upload either one under Push and it shows as uploaded under Firebase Analytics, and the other way round.

I lost a config file.

Download it again from Project settings → Your apps. Config files are not secrets and can be downloaded as often as you like.

The service account key is different — Firebase cannot show it again. Generate a new one and upload that.

Can I use a Firebase project I already have?

Yes, provided you add apps matching your Twinr bundle ID and package name. A project created for a website or a different app will not have them.

I changed my package name or bundle ID in Twinr.

Register a new app in Firebase with the new identifier, download its config file, and upload that. The old file points at the old identifier and stops working.

Notifications arrive on Android but not iOS.

Check that an iOS app is registered in the same Firebase project and that GoogleService-Info.plist came from it. A .plist from a different project uploads normally and never delivers.

Last updated