Push notifications: badge not removing on iOS

Since I migrated from Capacitor 3 to 4, the notification badge in iOS is not removed when calling removeAllDeliveredNotifications(). Android works fine.
Someone else having this problem?

I’m having, suddenly, the same problem and I’m not able to fix it.

Did you find any workaround?
The only “working” things is callind the removeAllDeliveredNotifications() inside another component after that all the app stuff are loaded. In my case that function is called everytime a user goes to the home page.

You could try to remove the notification badge with the Capacitor Badge plugin:

import { Badge } from '@capawesome/capacitor-badge';

const clear = async () => {
  await Badge.clear();