Push notification setting

I am using ts-sdk to implement the push notification token & device registration for the app development using React Native.
I know that ts-sdk doesn’t provide the push notification related parts still.
But as I can use the client.http.post functionality manually, so I tried to use that.

await client.http.post(
                      platform: Platform.OS,
                      token: await fbMessaging.getAPNSToken(),
                      deviceId: await RNDeviceInfo.getUniqueId()
                      headers: { 'X-API-Key': AMITYCO_API_KEY }

And this endpoint is succeed with response { status: 'success' }.
But when I send the new message to this account using other account, I couldn’t receive the push notification still.
Just I know about the deviceId usage when create the client.
But ts-sdk uses the localStorage to get the deviceId information and React native doesn’t have localStorage. So when create the token, the deviceId is null now.
Can be this a reason of my push notification issue?
Or if there is any other reason, can you let me know about that?


Hello @tech_kirbly To troubleshoot your push notification issue, please check the following:

  1. Ensure Firebase/APNs certificates are correctly set up.
  2. Verify certificates on the respective console (Firebase for Android or Apple Developer for iOS).
  3. Double-check your app’s notification settings and permissions.
  4. Upload the correct APNs certificate or FCM configuration in the Firebase console.

Please refer to these documents for more details:

Hi, Thanks for your reply.

Regarding 2, 3, 4 checking, I have tried to send the push notification from the Firebase CloudMessaging Dashboard. And it works well.
With this result, I think 2, 3, 4 items are set up correctly.

For the 1st one, I want to believe that this is set up correctly as well. But there is no way to confirm. And I couldn’t remove this setting and add new setting.

There is no way to confirm the result more accurately?

Looking forward to hearing from you again.

Hello @tech_kirbly , Thanks for information that you provide , Please check and follow these steps: React Native Installation Guide - Push Notification.

Yeah. It is working well.
My solution is same with your repository working.
It did not work with the development mode (local environment).
After uploading it on “testflight”, it worked correctly.

Thanks for your update.

1 Like