Please provide the following:
- SDK Version: 36.0.0
- Platforms(Android/iOS/web/all): IOS.
More context about the duplicate PN issue:
- Excessive number of notifications was received for certain messages . I’ve got 10x3, 3 messages each get 10 notifications.
This is code server side . I am using expo-sdk-python.
for batch in partition_all(100, tokens):
try:
responses = client.publish_multiple([PushMessage(
to=token, title=title, body=body, data=data
) for token in batch])
# Handle individual token errors
for response in responses:
_process_expo_errors(response)
except PushServerError as error:
# There will be more cases but let's do this first
error_code = get_in([0, 'code'], error.errors, None)
if error_code == 'PUSH_TOO_MANY_EXPERIENCE_IDS':
logger.debug(
'Error sending Expo notification, try sending one-by-one',
)
for token in batch:
_notify_users_expo.delay([token], title, body, data)
return
raise