Silent notification appears on home screen when app not open

I'm trying to send my app silent push notifications by setting the "content-available" flag to 1 in the notification payload. This works, but there is a problem: if my app is not running in the foreground, the notification is visible on the home screen. I don't want this: I just want the app to see it, without waking up the screen or alerting the user.

If the app is open when the notification comes in, it works as expected; I receive the notification inside my app, and iOS does not display any alert or banner.

I configured my app with the "Remote Notifications" background mode.

What am I doing wrong?

Watch the following video: https://developer.apple.com/videos/play/wwdc2020/10095/

Alert Push Notifications

Implementing Background Push Notifications This one doesn't use UNUserNotificationCenter and could be your issue if used.

Silent notification appears on home screen when app not open
 
 
Q