Commit b0ce2d1
Suppress silent passive notifications in willPresent handler (#655)
UNUserNotificationCenterDelegate.willPresent returned
[.banner, .sound, .badge] unconditionally, which meant any notification
iOS routed through this handler while the app was foregrounded produced
sound — including the Live Activity push-to-start payload, which is
intentionally silent (interruption-level: passive, empty title/body).
Now returns [] for passive notifications and for ones with empty
title/body. The four intentional alerts (renewal-failed, APNs
credentials missing, push-to-start token missing, alarms) all use
non-empty title/body and the default .active interruption level, so
they continue to surface.
Also expanded the willPresent log line with interruptionLevel and
title/body presence so future reports can confirm whether iOS routed
a given payload here.1 parent a1e8e95 commit b0ce2d1
1 file changed
Lines changed: 14 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
270 | 280 | | |
271 | | - | |
272 | 281 | | |
273 | 282 | | |
274 | 283 | | |
0 commit comments