# Push notifications to iOS & Android devices

> Learn how to send and configure push notifications on iOS and Android devices. Discover platform-specific settings, how to send impactful messages, and redirect users to screens using PandaSuite.

https://docs.pandasuite.com/essentials/deployment-services/push-notifications-to-ios-and-android-devices/

**Send a message directly to your users' iOS or Android devices even if the application is not open. You can also automatically redirect to a screen within the application.**

[Image: iPhone lock screen showing a push notification from a museum app, suggesting a visit on a rainy day]

A true marketing tool, it allows you to retain your users and maintain their engagement over time. Learn how to send and configure your push notifications.

## Configure push notifications

To send push notifications, your application must be published on the App Store or Google Play. Discover the settings to configure based on each platform:

### On ios

It is necessary to create a specific iOS certificate to enable push notifications. Learn more: [Create an iOS Certificate](https://docs.pandasuite.com/essentials/mobile-publishing/ios/generate-an-ios-certificate/).

Next, simply upload this certificate and insert the password in the dedicated section of your dashboard ( **Settings** > **Push Notifications** > **Configure iOS Push Notifications**).

[Image: Configure iOS Push Notifications section of the app settings: the P12 certificate, its password and the certificate type are framed]

### On android

It is necessary to associate a Firebase Cloud Messaging account with your Firebase project. Here is the tutorial to follow: [Configure Push Notifications on Android](https://docs.pandasuite.com/essentials/mobile-publishing/android/configure-push-notifications-for-your-android-app/).

If you encounter any issues configuring this service, feel free to contact the team! 😊

## Send a push notification

To send a push notification, go to your dashboard in the Apps tab:

- Select your application
- Go to the **Services** > **Push Notifications** section
- Click on the **Send a message** button
- Type your message in the field: it should be short and impactful, **the limit is 150 characters**.

[Image: Send a message window: a message of 84/150 characters is framed; below, an optional Payload with wid and the Send a message button]

If your app has [channels](https://docs.pandasuite.com/essentials/content-management/channel/), a **Target Users** section lets you choose who receives the message: select a channel to send it only to the users of that channel, or keep **No Channel** to send it to all your users. Without channels, **the message is sent to all your users**. It is not possible to schedule the message: it is sent as soon as you click **Send a message**.

If your users have agreed to receive notifications when they installed your application, they will receive your message on their phone or smartphone.

## Redirect to a screen

You can ensure that the user is automatically redirected to a screen after clicking on the notification.

To do this, when writing the message, add a parameter in the **Payload** field.

Indicate `"wid" = "id"` where id is the identifier of your screen. To obtain the identifier of your screen, go to PandaSuite Studio. Select your screen and click on the dropdown menu.

[Image: Menu of the 1. Articles screen in PandaSuite Studio, with Copy ID framed to get the screen identifier]

## Use push notification data in your project

When a push notification is received, PandaSuite updates the **Push Notification (data)** project data and triggers the **Push Notification Received** project trigger. You can then use this information in your bindings, conditions, and actions.

In PandaSuite Studio:

- Select **Project**
- Open the **Properties** panel
- Add a **Push Notification Received** trigger
- Use the **Push Notification (data)** branch in the **Data binding** panel

The exposed structure is:

- `Project > Push Notification (data) > title`
- `Project > Push Notification (data) > message`
- `Project > Push Notification (data) > sound`
- `Project > Push Notification (data) > Data > ...`

The **Data** branch contains the custom keys sent in the push payload. For example, if your push contains `campaign`, `discount`, or `wid`, you can read these values from `Project > Push Notification (data) > Data`.

Example:

```json
{
  "wid": "page_promo",
  "campaign": "summer2026",
  "discount": "20"
}
```

You can then:

- Display a promotional message adapted to `campaign`
- Show a special offer based on `discount`
- Trigger an action when **Push Notification Received** occurs

> **Info**
>
> Use `title`, `message`, and `sound` for the notification metadata, and `data` for your custom keys.

## Automate push notifications with your backend (Web App)

If your native app embeds a Web App (for example with the [Web component](https://docs.pandasuite.com/essentials/components/web/)), you can send real push notifications triggered by your own backend. The native shell retrieves the device token and exposes it to your Web App via PandaBridge.

For projects built directly in PandaSuite Studio, the same token is also available through data binding at `Project > Context > Viewer > deviceToken`. Use this path when you want to send the current device token to an API from a standard PandaSuite action or component. See [Project information](https://docs.pandasuite.com/essentials/project-properties/project-information/) for the full project data tree.

### Prerequisites

- Complete the platform setup above (iOS certificate/APNs and Android Firebase/FCM).
- Ensure your Web content loads PandaBridge.

Add the PandaBridge script and capture the device token on load:

```html
<script src="https://cdn.jsdelivr.net/npm/pandasuite-bridge/lib/pandasuite-bridge.min.js"></script>
<script>
  // Runs inside your Web App (embedded page)
  PandaBridge.init(() => {
    PandaBridge.onLoad((properties) => {
      const deviceToken = properties && properties.__ps_device_token;
      if (deviceToken) {
        // Associate this token with the signed-in user in your backend
        saveTokenForCurrentUser(deviceToken);
      } else {
        // Token not available yet (permission denied or first launch)
        // Optionally retry later in the session
      }
    });
  });
</script>
```

Once stored server-side, you control automated business rules (e.g., X days after an event) and send push notifications using the platform services:

- Android: Firebase Cloud Messaging (FCM) using the device token
- iOS: Apple Push Notification service (APNs) using the device token

To deep-link to a specific screen from your own server, include the same payload parameter described above:

- APNs example:

```json
{
  "aps": { "alert": "Your message" },
  "wid": "your-screen-id"
}
```

- FCM example:

```json
{
  "notification": { "body": "Your message" },
  "data": { "wid": "your-screen-id" }
}
```

> **Warning**
>
> The device token may be missing if the user declined notifications or on the very first launch. Plan for retries (for example, refresh the token at sign-in) and avoid assuming it is always present.

> **Info**
>
> The `__ps_device_token` property is available only in native iOS/Android builds. It is not present in web-only projects.
