---
updatedAt: 2025-11-11T02:47:04.000Z
agentTools:
  projectIndex: https://docs.webengage.com/llms.txt
---

# Troubleshooting

### 1. Unable to receive Push Notifications on my Android app after integrating WebEngage with the Invertase React Native Firebase SDK. How can I solve this?

Before proceeding, please ensure that you've followed all the steps mentioned under *[React Native Android Push Messaging](react-native-push-messaging#section-android).* Here's how you can troubleshoot:

**Step 1:** Modify the `onMessageReceived` method in the `MyFirebaseMessagingService.java` file:

```java
public class MyFirebaseMessagingService extends FirebaseMessagingService {
			@Override
			public void onMessageReceived(RemoteMessage remoteMessage) {
				Map<String, String> data = remoteMessage.getData();
		    	if (data != null && data.containsKey("source") && "webengage".equals(data.get("source"))) {
		            WebEngage.get().receive(data);
		        } else {
		        	(new io.invertase.firebase.messaging.RNFirebaseMessagingService()).onMessageReceived(remoteMessage);
		        }
		    }
		    ...
		}
```

**Step 2:** Add the `MyFirebaseMessagingService` tag above the `RNFirebaseMessagingService` tag in the `AndroidManifest.xml` file.

And you're good to go :)

Please feel free to drop in a few lines at *<support@webengage.com>* in case you have any further queries. We're always just an email away!

### 2. How to fix the warning from Apple (app includes references to location-related APIs)?

Currently, the iOS SDK requires clients to add the`NSLocationAlwaysAndWhenInUseUsageDescription` & `NSLocationWhenInUseUsageDescription` keys along with a placeholder purpose string in the Info.plist, even if their app does not use location services.\
For apps that do not use location services should migrate from WebEngage to WebEngage/Core. Below are the steps:\
**Step 1:**

Add this at the top of your PodFile

```ruby
ENV['WEBENGAGE_USE_CORE'] = 'true'
```

And then run the following command on terminal.

```shell
$ pod install
```

This change ensures you're using only the core functionalities of the WebEngage SDK, excluding location-related capabilities.

**Step 2:**\
If your app doesn’t require location tracking, remove the following keys from your Info.plist file:

* `NSLocationAlwaysAndWhenInUseUsageDescription`
* `NSLocationWhenInUseUsageDescription`

These keys are no longer necessary when using the core variant and helps avoid unnecessary warnings during publishing the app to AppStore.

> 🚧 In case, you have added WebEngage manually in the podfile, remove it.