Push notifications are received twice by (all?) iOS users

[Problem/Question]
Our iOS users receive the new message notifications twice. Android users only receive one.

[Example]

  • App: 445FD0C6-4855-…
  • User who received multiple notifications on iOS: c0c55453-7c1c-…
  • Group channel: sendbird_group_channel_10285850_37919ee341cb…
  • Message: “Ok”, sent at 2023-08-30 14:31 UTC-4

[SDK Version]
4.5.0

[Reproduction Steps]
Simply send a message from one user to another, in a group channel.

[Frequency]
TBC ; we can reproduce easily internally at least.

[Current impact]
All iOS users ?

[Verified]
We checked that we only have one APNS certificate. The user also only has one iOS token in their profile.

Resolution: Sendbird is sending only one notification.
It was our app, in the background task (triggered when a notification is received when the app is not in foreground) that was showing another notification. This is needed for Android, but on iOS, the OS itself will show a notification without any code, so displaying a notification with our code resulted in two notifications shown to the end-user.
We simply added a check to only trigger this code for Android-only.