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

App Messages

A quick start guide to adding App Message support to your React Native application with the Pushly PushSDK

App Messages, unlike Push Notifications, allow you to interact with and engage your user base without the need for a subscription token. App Message can be configured to automatically display based on a number of criteria including custom conditions that can be provided programmatically.

For App Messages with custom conditions the PushSDK provides convenience methods for you to signal when these conditions have been met as well as the ability to listen to certain lifecycle events.

Prerequisites

Before you can integrate App Messages with the SDK the following requirements must be met:

  • A React Native application already integrated with the PushSDK

  • PushSDK release supporting App Messages (See version support chart below)

SDK
Earliest Version with App Messages

React Native SDK

1.2.0+

Step 1: React Native SDK Setup

For applications not already using the PushSDK please see our Native App Push setup guide for React Native.

For applications already using the PushSDK you might need to upgrade to a later version that includes App Message support.

yarn add @pushly/push-sdk-react-native@">=1.2.0 <2.0.0"
npm install --save @pushly/push-sdk-react-native@">=1.2.0 <2.0.0"

Step 2: Create and Schedule an App Message

Use the Pushly Platform to build and schedule your first App Message.

Step 3: (Optional) Trigger Your App Message's Custom Condition

When using custom conditions the PushSDK is used to provide these conditions programmatically which then triggers an evaluation of which App Messages are currently active and match the provided conditions.

Both trigger methods are asynchronous and return a Promise<void> that resolves once the condition(s) have been sent to the SDK.

In most cases a single condition is triggered and evaluated at a time. For these situations you would use the trigger(condition: string, value: string): Promise<void> method signature.

However, there might be situations where it is more convenient to trigger multiple conditions at once for evaluation. In these cases you can pass an object containing any number of conditions to the triggers(conditions: Record<string, string>): Promise<void> method signature.

Step 4: (Optional) Listen to App Message Lifecycle Events

See our SDK Callbacks documentation for information on handling lifecycle events of your App Messages.