client.updateAppSettings({
push_config: {
version: "v3",
}
});
Upgrading to Push v3
Why upgrade?
Push v3 is the future of Push Notifications. It is a complete rewrite of the Push Notification system, and it is designed to be more efficient, reliable, easier to use and customize push payload.
Support new types of push notifications, such as reactions and message edits.
Supports customization of push payloads, including the ability to add custom data. But you don’t have to configure it as it comes with well-designed default templates.
Similar to v2, v3 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.
v1 is deprecated and no longer supports sending push notifications for firebase though APN supports sending push notifications.
v2 does not support customization of push payloads.
Multi bundle support for push providers.
Multi-tenancy and continuous delivery are covered in a single Stream app.
Supports push preferences at user level, and channel level.
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
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 3.
How to Migrate to Push v3?
Migration is simple. It can be done via API or in the dashboard as below:
Migrate using the API
Set version to v3 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, v3 follows the new standard.
Enable push notifications and templating
After migrating to Push v3, you need to enable push notifications for each notification type such as new messages, message edits, reactions, and more. You may also configure custom templates if desired, see details here.