Hello @Yevhen Volynets , thanks for the question.
The error message you’re seeing is due to the size of the notification payload exceeding the maximum limit allowed by the Apple Push Notification service (APNs). The maximum payload size for APNs is 4096 bytes
The payload you’re using {"aps":{"alert":"Notification Hub test notification"}}
seems to be well within the limit. However, the error message indicates that the actual length of your payload is 6138 bytes, which exceeds the limit.
To fix this, you need to reduce your actual notification payload size to be less than 4096 bytes. Here are some tips:
- Check your payload: Ensure that there are no additional data being added to your payload inadvertently which might be causing it to exceed the size limit
- Reduce the size of your payload: If your payload does indeed exceed the limit, you’ll need to reduce its size. This might involve removing unnecessary data or optimizing the structure of your payload
Remember, it’s important that your payload is correctly formatted for APNs. For example, your payload should be in this format: {"aps": {"alert": "Your Message"}}
Hope that helps.
-Grace