invertase / notifee

⚛️ A feature rich notifications library for React Native.
https://notifee.app
Apache License 2.0
1.85k stars 223 forks source link

createTriggerNotification is not working with specific ios configuration #826

Open ayman-kouzayha opened 1 year ago

ayman-kouzayha commented 1 year ago

In our app we have a scenario where we schedule a silent notification to clear the badgeCount for iOS, we discovered that if we called createTriggerNotification with this below example Notification, the function will not work

{
  id: `test-silent-id-12345`,
  title: undefined,
  body: undefined,
  ios: {
    badgeCount: 0,
    foregroundPresentationOptions: {sound: false},
  },
}

A call for getTriggerNotifications will reveal that the notification was not scheduled.

to bypass this issue we had to provide an optional sound property for iOS.

{
  id: `test-silent-id-12345`,
  title: undefined,
  body: undefined,
  ios: {
    sound: 'default',
    badgeCount: 0,
    foregroundPresentationOptions: {sound: false},
  },
}

This issue is reproducible on the latest version of Notifee 7.8.0

abhibhat33 commented 9 months ago

hey, @liamjones have you found solution?

liamjones commented 9 months ago

@abhibhat33 we're just using the workaround Ayman mentioned in the OP for now (add sound: 'default').

github-actions[bot] commented 8 months ago

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

ayman-kouzayha commented 8 months ago

Not stale

liamjones commented 1 month ago

@mikehardy can you reopen this when you have a chance please? I was away and missed the stale notification grace period.

mikehardy commented 1 month ago

Sorry @liamjones and it has been a little silly that the onus was on you for that - I looked slightly deeper and saw that our stale bot exclusion list of labels was sane, but the labels did not exist here (they were from react-native-firebase repo from when this repo split!). Added them here and added the fancy '📌 pin' label which should keep it open.

liamjones commented 1 month ago

Thanks Mike!

liamjones commented 6 days ago

@mikehardy looks like the "pin" label didn't prevent the stale bot here for some reason? 🤔

mikehardy commented 42 minutes ago

@liamjones what a phenomenal waste of time trying to pin an issue. I sorted it out on react-native-firebase a while back, and just synced that config over here with https://github.com/invertase/notifee/commit/6b06c9f3ced0388da99dea061be5e3a1536588f7 and a changeup of the labels. Going to be a bit irritated if that doesn't do it - we all have better things to do for sure