klaviyo / klaviyo-react-native-sdk

MIT License
4 stars 3 forks source link

iOS badge notification issue #151

Open youcefswoo opened 4 months ago

youcefswoo commented 4 months ago

Checklist

Description

In iOS, when I receive a notification, the badge increments to 1, which is fine for now. However, when I receive other notifications, the badge counter remains at one and does not increment.

Expected behavior

To have the badge counter reflect the number of notifications I have received.

Actual behavior

The badge counter always shows one, regardless of the number of notifications received.

Steps to reproduce

Receive multiple Klaviyo notifications

The Klaviyo React Native SDK version information

0.3.1

Environment Description

"react": "18.2.0","react-native": "0.73.3","@react-native-firebase/messaging": "19.1.0",

ajaysubra commented 4 months ago

Hey @youcefswoo thanks for reaching out. We are aware of this issue from a previous customer and have made some updates to the example app in this PR to address this. Also, you can refer to the iOS readme - tracking open events section for more information on this.

Currently, in our sending systems, we allow our customers to either add a badge or not. When a customer adds a badge, the count is always sent as 1 since our systems don't really know what the count on the app is since that information is never sent to our systems.

We plan to provide more flexibility around the badge count and the ability to increment the value in the future, but that functionality is not currently supported.

The best option for now is the PR linked above - where when a user taps on a notification, you can decrement the count by 1, or when the app is started, you can set it to 0. We do realize that neither of these gives our developers the opportunity to increment the badge count, but at least by implementing this PR, your users will not always see a badge on the app icon. Whenever we have the feature implemented we will get back to you.

youcefswoo commented 4 months ago

Hey @youcefswoo thanks for reaching out. We are aware of this issue from a previous customer and have made some updates to the example app in this PR to address this. Also, you can refer to the iOS readme - tracking open events section for more information on this.

Currently, in our sending systems, we allow our customers to either add a badge or not. When a customer adds a badge, the count is always sent as 1 since our systems don't really know what the count on the app is since that information is never sent to our systems.

We plan to provide more flexibility around the badge count and the ability to increment the value in the future, but that functionality is not currently supported.

The best option for now is the PR linked above - where when a user taps on a notification, you can decrement the count by 1, or when the app is started, you can set it to 0. We do realize that neither of these gives our developers the opportunity to increment the badge count, but at least by implementing this PR, your users will not always see a badge on the app icon. Whenever we have the feature implemented we will get back to you.

Thanks for your clarification.