Introduction
Complete list of all public methods in the Mapp Engage React Native Plugin, grouped by function. Platform availability: Both = iOS and Android, iOS = iOS only, Android = Android only. An asterisk (*) indicates the method exists on both platforms but is a no-op on the indicated platform in the current SDK version.
Initialization & Status
Method | Returns | Platform | Description |
|---|---|---|---|
| Promise<boolean> | Both | Initializes the SDK. On iOS, only |
| void | Android | Initializes against a custom CEP test endpoint. |
| Promise<boolean> | Both | Returns true when the SDK is initialized. |
| Promise<void> | Android | Resolves when initialization completes. |
| EmitterSubscription | iOS | Fires when iOS SDK initialization completes. |
Note
Changed in 2.0.0:
engage()now returns a promise instead ofvoid. Await it before calling APIs that depend on the native Mapp singleton, such asisReady()orisDeviceRegistered(). See Breaking Changes in 2.0.0.
Device & Registration
Method | Returns | Platform | Description |
|---|---|---|---|
| Promise<boolean> | Both | Returns true when the device is registered with Mapp. |
| Promise<Object> | Both | Returns general device information. |
| Promise<any> | Android | Returns device DMC configuration from the Mapp backend. Returns null on iOS. |
Push Notifications
Method | Returns | Platform | Description |
|---|---|---|---|
| Promise<boolean> | Both | Returns true when push notifications are enabled. |
| void | Both | Enables or disables push notifications. |
| Promise<boolean> | Both | Requests POST_NOTIFICATIONS permission on Android 13+. Returns true on iOS without prompting. |
| void | iOS | Delays the system notification permission prompt. Call before |
| void | iOS | Triggers the iOS notification permission dialog. |
| void | iOS | Controls notification display when the app is in the foreground. |
| Promise<boolean> | Both | Sets the FCM registration token manually. Since 2.0.0, iOS rejects with |
| Promise<string> | Both | Returns the current FCM registration token. Since 2.0.0, rejects on failure instead of resolving or crashing — see the note below. |
| void | Both | Forwards a Firebase remote message to the Mapp SDK for processing. |
| Promise<boolean> | Both | Returns true if the remote message originates from Mapp. |
| void | Both | Clears all app notifications from the notification tray. |
| void | Both | Clears a specific notification by identifier. |
| void | Both* | Removes the app badge number. No-op on Android SDK v7. |
| EmitterSubscription | Both | Subscribes to push notification events. |
| void | Both | Removes a push notification listener. |
| EmitterSubscription | Both | Subscribes to deep link events from push notifications. |
| void | Both | Removes a deep link listener. |
Warning
Changed in 2.0.0:
getToken()now rejects instead of crashing (Android) or silently failing (iOS). Android rejects withFCM_REGISTRATION_FAILED; iOS rejects withAPNS_TOKEN_UNAVAILABLE, because Mapp's auto-integration owns the native APNs token. Wrap calls in try/catch. See Breaking Changes in 2.0.0.
GeoFencing
Method | Returns | Platform | Description |
|---|---|---|---|
| Promise<boolean> | Both | Requests location permission required for geofencing. Since 2.0.0, Android shows the foreground and, when required, background permission dialogs, instead of only checking the current state. |
| Promise<string> | Both | Starts geofence region monitoring. Deprecated since 2.0.0 — use |
| Promise<string> | Both | Stops geofence region monitoring. Deprecated since 2.0.0 — use |
| Promise<string> | Both | Starts geofence region monitoring. The preferred spelling since 2.0.0. |
| Promise<string> | Both | Stops geofence region monitoring. The preferred spelling since 2.0.0. |
Note
Changed in 2.0.0:
requestGeofenceLocationPermission()can now display system permission dialogs on Android. Call it from a clear user interaction, and only after explaining why your application needs location access. See Breaking Changes in 2.0.0.
In-App Messaging
Method | Returns | Platform | Description |
|---|---|---|---|
| void | Both | Triggers an in-app message by event name. |
| Promise<any> | iOS | Fetches inbox messages. Results delivered via |
| Promise<any> | Both | Fetches the latest inbox message. |
| EmitterSubscription | iOS | Receives the full inbox message list after |
| EmitterSubscription | iOS | Receives individual inbox message events. |
| EmitterSubscription | iOS | Receives rich push message content. |
| void | Both | Marks an inbox message as read. Since 2.0.0, Android also updates the message status on the Mapp backend — previously a no-op. |
| void | Both | Marks an inbox message as unread. Since 2.0.0, Android also updates the message status on the Mapp backend — previously a no-op. |
| void | Both | Marks an inbox message as deleted. Since 2.0.0, Android also updates the message status on the Mapp backend — previously a no-op. |
| string | Android* | Tracks an in-app message statistic. No-op in Android SDK v7. |
Note
Changed in 2.0.0:
inAppMarkAsRead,inAppMarkAsUnRead, andinAppMarkAsDeletednow call Mapp Engage 7.1.2 to update the message's server-side status on Android, instead of doing nothing. This is intended, but it introduces a network and backend side effect where there was none before. The legacyeventIdargument remains accepted for source compatibility; the message is identified bytemplateId. See Breaking Changes in 2.0.0.
User Data
Method | Returns | Platform | Description |
|---|---|---|---|
| Promise<boolean> | Both | Sets the device alias. Pass |
| Promise<string> | Both | Returns the current device alias. |
| void | Both | Sets multiple custom attributes from an object. |
| Promise<Object> | Both | Returns values for the specified attribute keys. |
| void | Both | Sets a single string custom attribute. |
| void | Both | Sets a single integer custom attribute. |
| Promise<string> | Both | Returns the string value of a custom attribute. |
| void | Android | Removes a custom attribute by key. |
| void | iOS | Increments a numeric custom attribute by the given value. |
| void | Both | Adds a tag to the device. |
| void | Both | Removes a tag from the device. |
| Promise<string[]> | Both | Returns all tags set on the device. |
| Promise<void> | Both | Sends a |
| Promise<any> | Android | Executes a named SDK action. Used internally by |
| void | Both | Clears the user identity. Pass |
Screen Orientation
Method | Returns | Platform | Description |
|---|---|---|---|
| void | Android* | Locks or unlocks screen orientation. No-op in Android SDK v7. |