# Firebase Notifications (Advanced)

Create a new Firebase Project

* Go to <https://console.firebase.google.com/>
* Click New Project, enter the project name

{% hint style="info" %}
You can use the same one for Push notifications or for Firebase Deep Links.
{% endhint %}

## **Ensure Firebase Cloud Messaging API (V1) is enabled**

In your project, click the **Gear icon** next to "Project Overview" in the top left of the left-hand menu and select **Project settings**. Select the **Cloud Messaging** tab.

<figure><img src="/files/djGuLfp4PoeSdyBrFTUR" alt=""><figcaption></figcaption></figure>

\
If **Firebase Cloud Messaging API (V1)** is disabled, then click the kebab menu icon on the top right corner and open the link.

<figure><img src="/files/1whvU0EhVFoV4QKDxNYJ" alt=""><figcaption></figcaption></figure>

\
On the subsequent page, click **Enable**. You may need to wait a few minutes for the action to propagate to Firebase systems.

{% hint style="info" %}
You can skip this step if you have already set up the [Notifications](/natively-platform/features/notifications/onesignal-notifications.md) feature.
{% endhint %}

## **(Only for iOS) Ensure the** "Push Notification" capabilities are enabled for your App.

1. Go to the [Apple Developer Identifiers](https://developer.apple.com/account/resources/identifiers/list) -> Find your app's Bundle ID. Click on it

<figure><img src="/files/y6zQ8xfUofELPr6K9nZA" alt=""><figcaption></figcaption></figure>

2. Scroll down and enable "Push Notifications". Click Save.

<figure><img src="/files/1M7In3fahICxlfZA9wht" alt=""><figcaption></figcaption></figure>

## **Add Android & iOS apps**

Please follow this guide: [Add Android & iOS apps](https://docs.buildnatively.com/natively-platform/features/deeplinks/firebase#add-android-and-ios-apps)

Download the GoogleService-Info.plist and the google-services.json files on this step.

{% hint style="info" %}
You can skip this step if you have already set up the [Firebase Deep Links](/natively-platform/features/deeplinks/firebase.md)
{% endhint %}

## Upload your APNs authentication key (iOS) <a href="#upload_your_apns_authentication_key" id="upload_your_apns_authentication_key"></a>

Please use the [following guide](/guides/generate-ios-push-key.md) to generate the authentication key is you do not already have one.

1. Inside your project in the Firebase console, select the gear icon, select **Project Settings**, and then select the **Cloud Messaging** tab.
2. In **APNs authentication key** under **iOS app configuration**, click the **Upload** button.
3. Browse to the location where you saved your key, select it, and click **Open**. Add the key ID for the key and click **Upload**.

## Enable Firebase Push notifications on the Natively platform

* Turn the switcher on
* Upload the iOS Config file (GoogleService-Info.plist)
* Upload the Android Config file (google-services.json)
* Click the 'Save' button to save your changes

<figure><img src="/files/ydjuXdsBY82MSEQ2eZxu" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you have already enabled the [Firebase Deep Links](/natively-platform/features/deeplinks/firebase.md) feature for your app, you may see the iOS Config file and the Android Config file uploaded. That's because these files are the same for the Firebase Notifications feature.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.buildnatively.com/natively-platform/features/notifications/firebase-notifications-advanced.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
