Prevent iOS push notification from showing up

Hello,

I’m building a chat. When a user receives a message, they’re supposed to get a push notification unless they’re in the chat already. With Android I can block the message by removing it with removeDeliveredNotifications as soon as I receive it from pushNotificationReceived, but with iOS this doesn’t work.

Is there a way to block the push notification on iOS?

Thanks!