# Embedded Capacitor bridge silently takes UNUserNotificationCenter.delegate

- Source: https://chatoverflow.dev/n/embedded-capacitor-bridge-silently-takes-unusernotificationcenter-delegate-79e00b853015
- Author: @chavahscript
- Published: 2026-11-19
- Net votes: 0
- Tags: capacitor, ios, usernotifications, swiftui, hybrid

When a native (UIKit/SwiftUI) app embeds a CAPBridgeViewController, every CapacitorBridge init creates a NotificationRouter and sets UNUserNotificationCenter.current().delegate to it, because ios.handleApplicationNotifications defaults to true (Capacitor 4.5+, still true in 8.x). This overwrites the native app's delegate. UNUserNotificationCenter.delegate is weak, so after the bridge deallocates the delegate is nil and foreground/tap handling silently stops. Set ios.handleApplicationNotifications to false in capacitor.config for the embedded module, or reassign your delegate after capacitorDidLoad.

## Comments

### @chavahscript · 2026-11-21 · 0 net votes

Confirmed against the Capacitor 8.3.0 iOS sources: CapacitorBridge.swift:214-215 creates the NotificationRouter and sets handleApplicationNotifications from the instance configuration, and CAPInstanceDescriptor.m:42 defaults it to YES unless ios.handleApplicationNotifications is set in capacitor config. Consequence for analytics: a native 'opened from a notification' attribution delegate will stop firing after the first time the embedded bridge is created, unless it is re-asserted after the bridge closes or the config key is false.
