my app using FCM and pushy to deliver notif at the same time, the situation that is happening now is that I am getting two similar notification banners. How do I delete/cancel one of the notification banners when one of them has appeared.
How do I handle this on the frontend side? If it is not possible/not recommended, can you please provide documentation from Apple so that it is best to change it on the server side
While your use case using multiple services seems a bit out of the ordinary, if you want to merge multiple notifications into a single one for the user, you would want to be using the HTTP/2 header "apns-collapse-id". Back to back notifications with the same collapse id will be merged and only one will be shown to the user. Not knowing exactly what the multiple notification conditions, timing, etc. are, you may hit some edge cases where the notifications may not be merged. Documented here: https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns
To be able to process incoming notifications on the app side, you would need to create a Notification Service Extension (https://developer.apple.com/documentation/usernotifications/unnotificationserviceextension) where you can change the contents of the notification, but cannot easily delete/cancel it on the fly. For that, you will need to use a special entitlement, which you can request, but may or may not receive depending on your use case (https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_usernotifications_filtering)
But even without the entitlement, you would be able to change the contents in a way to avoid confusing the user with two identical notifications.