Server setup
For the push notifications to be forwarded to FCM or APNs, the Push Server will need to be configured with your FCM or APNs server API credentials.App setup
Register the device token
To enable a device for push notifications, it’s essential to register the device token usingwalletKit.registerDeviceToken
. This token can be obtained from either FCM or APNS, depending on the platform used.
To receive push notifications from WalletConnect’s Push Server via Firebase Cloud Messaging, you will need to setup Firebase in your project.
You can follow their documentation - Firebase documentation.
Once you have Firebase configured, you can obtain the device token by calling messaging().getToken()
. This unique token is used to identify each device.
walletKit.registerDeviceToken
and passing the token as an argument.
The registerDeviceToken
should be called every time the client is initialized.