# How to prevent Firebase from intercepting Batch push notifications?

On iOS, Firebase may intercept the content of push notifications sent from Batch. As a result, Batch SDK may no longer be able to:

1. **Detect push opens**, resulting in broken campaigns statistics ([see more here](https://doc.batch.com/developer/sdk/android/troubleshooting#batch-is-not-showing-the-direct-open-rate-of-my-campaigns))
2. **Handle deeplinks**. The Batch SDK never receives the deeplink and cannot pass it to the app to direct your users to the right page.
3. **Display** [**Mobile Landings**](https://doc.batch.com/getting-started/features/mobile-engagement-platform/push/message-edition#mobile-landing)**.** The information that the Batch SDK needs to display the In-App landing page is located in the payload of the notification intercepted by Firebase.

## Detecting the issue <a href="#detecting-the-issue" id="detecting-the-issue"></a>

If you are facing one of these issues, open your app and look at the logs. The Batch SDK will print an alert:

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

## Fixing the issue <a href="#fixing-the-issue" id="fixing-the-issue"></a>

Here are the two steps you need to take to fix the issue:

1. Switch to a manual integration, as described here: [Manual Integration](https://doc.batch.com/developer/sdk/ios/advanced/manual-integration)
2. Then, make sure you intercept the payload of Batch notifications as described here: [Intercepting Notifications](https://doc.batch.com/developer/sdk/ios/advanced/intercepting-notifications)

Here is how you can test your integration:

1. You should no longer see the alert in the logs of your app
2. Send a test push notification to your device and open it ([How to send a test push notification to your mobile?](https://doc.batch.com/guides-and-best-practices/message/push-notifications/how-to-send-a-test-push-notification-to-your-mobile)). You should see the following line: `Push - App was opened from a Batch push`.
3. Then, try sending a test notification to your device with a deeplink. Go to the dashboard → Campaigns → Click on "New Campaign" → "Push message" → Head to the message edition part, edit the text of the notification, add a deeplink to the campaign → Click on "Send test", after selecting your device.
4. Send a preview of an In-App message to your device. Go to the dashboard → Settings → Themes → Select a theme or create one and click the "preview button". The In-App message should be displayed as soon as you click the notification.

{% hint style="info" %}
In case the In-App message is not displayed correctly or is dismissed by the splash screen of your app, make sure you implement the "do not disturb" mode ([see more here](https://doc.batch.com/developer/sdk/ios/mobile-landings#controlling-the-display-using-do-not-disturb-mode)). This will allow you to pause In-App messages until the app can display them correctly.
{% 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://doc.batch.com/developer/troubleshooting/how-to-prevent-firebase-from-intercepting-batch-push-notifications.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.
