Upgrading to Push v2

LAST EDIT Oct 11 2024

Why upgrade?

Copied!

First, v2 is simply Push but more convenient to implement, maintain, and build on top of. We've added several features that make push easier and more powerful:

  • Easier configuration

    • v1 has a template-based customization system and users need to learn the details of this template system.

    • v2 has a common message payload where SDKs automatically enrich messages and channels in the runtime and call the callback with these data where it's a familiar way of building by programming and any customization is possible.

  • Multi bundle support for push providers

    • Multi-tenancy and continuous delivery are covered in a single Stream app.

  • Preferences

    • Customization in multiple levels; app, provider, channel type, channel, user, and member.

    • Customization in message types; system messages, threads, mutes, mentions, etc.

  • No channel member count limitation

    • v1 has a limit of 100 members in a channel. If the member count goes higher than this value, newer members won't receive push notifications.

    • v2 doesn't have this limitation and it will continue working.

Version 1 (legacy) of push notifications is using Firebase's legacy FCM APIs. These APIs are no longer supported by Firebase. In order for your app to be able to send push notification, it is mandatory to upgrade to version 2.
Contact to support to get unlimited push support.

How to Migrate to Push v2?

Copied!

Migration is simple. It can be done via API or in the dashboard as below:

Migrate using the API

Copied!

Set version to v2 and provide any provider config you want to use.

Firebase

Firebase requires a service account configuration because Stream uses Firebase Admin SDK in the backend.

APN

APN supports only token-based authentication unlike v1, which supports both .p12 certificate and token-based authentication. Certificate-based authentication is currently deprecated by Apple, v2 follows the new standard.

Migrate using Dashboard

Copied!

1. Tap on the Upgrade button in the call-out

If your application is currently on v1, you will see a call to action at the top of the chat overview section and your APN and Firebase configuration will be marked as legacy.

Call to action when app is in v1
APN and Firebase configurations are marked as legacy

2. Enter your configuration credentials

At this point you should see a modal. Enter your configuration for the given push provider. Upon validation and saving, your app will be upgraded to v2.

APN upgrade flow (token based authentication)

Firebase upgrade flow (service worker authentication)

Do I need to change my Huawei and Xiaomi settings?

Copied!

Huawei and Xiaomi use the same configuration in v1 and v2 so you do not need to make any changes.