Are notification pushes not being received when in Picture-in-Picture mode?

Hello, I recently had an unusual experience, and I’m wondering if this is related to Apple’s policies, so I wanted to ask.

While a call is in Picture-in-Picture (PIP) mode, notification pushes from the same app do not appear. The API is being triggered, but the notification banner does not show on the device.

Once PIP is closed, the notifications start appearing normally again. Is this behavior enforced by Apple’s policies?

What’s interesting is that banners from other apps do appear — only the banners from the app currently in PIP are not shown.

Answered by DTS Engineer in 868838022

Hello, I recently had an unusual experience, and I’m wondering if this is related to Apple’s policies, so I wanted to ask.

It's not really about "policy" as such, but is actually about how the system handles notifications generally.

While a call is in Picture-in-Picture (PIP) mode, notification pushes from the same app do not appear. The API is being triggered, but the notification banner does not show on the device.

The issue here isn't PIP, it's the fact that the app is awake and considered "active". When an app is active, the system does not directly present notifications, but instead delivers them directly to the app through userNotificationCenter(_:willPresent:withCompletionHandler:). The app then has control over whether or not the notification is presented. Note that this is the same reason notifications don't necessarily appear when the app is foregrounded. The only difference here is that PIP is a slightly different variation of active/foreground.

Once PIP is closed, the notifications start appearing normally again. Is this behavior enforced by Apple’s policies?

No, the behavior here is defined by the app.

What’s interesting is that banners from other apps do appear — only the banners from the app currently in PIP are not shown.

Note that PIP is not the only case where apps that aren't "foreground" can "hide" what would otherwise be "visible" notifications. I believe VoIP apps with active calls can and I'm sure that there are other cases as well. The documentation says the delegate will be used when the app is in the "foreground", but the actual behavior is broader than that and probably not entirely consistent across OS versions.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

Accepted Answer

Hello, I recently had an unusual experience, and I’m wondering if this is related to Apple’s policies, so I wanted to ask.

It's not really about "policy" as such, but is actually about how the system handles notifications generally.

While a call is in Picture-in-Picture (PIP) mode, notification pushes from the same app do not appear. The API is being triggered, but the notification banner does not show on the device.

The issue here isn't PIP, it's the fact that the app is awake and considered "active". When an app is active, the system does not directly present notifications, but instead delivers them directly to the app through userNotificationCenter(_:willPresent:withCompletionHandler:). The app then has control over whether or not the notification is presented. Note that this is the same reason notifications don't necessarily appear when the app is foregrounded. The only difference here is that PIP is a slightly different variation of active/foreground.

Once PIP is closed, the notifications start appearing normally again. Is this behavior enforced by Apple’s policies?

No, the behavior here is defined by the app.

What’s interesting is that banners from other apps do appear — only the banners from the app currently in PIP are not shown.

Note that PIP is not the only case where apps that aren't "foreground" can "hide" what would otherwise be "visible" notifications. I believe VoIP apps with active calls can and I'm sure that there are other cases as well. The documentation says the delegate will be used when the app is in the "foreground", but the actual behavior is broader than that and probably not entirely consistent across OS versions.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

Are notification pushes not being received when in Picture-in-Picture mode?
 
 
Q