From 15864b712dd610acc090078fc4ab0c68499de474 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Thu, 25 Jul 2019 15:53:56 +0200 Subject: [PATCH] fix(ios): don't override notification delegate if already set --- .../Capacitor/CAPUNUserNotificationCenterDelegate.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ios/Capacitor/Capacitor/CAPUNUserNotificationCenterDelegate.swift b/ios/Capacitor/Capacitor/CAPUNUserNotificationCenterDelegate.swift index 2a1b732a0c..ed07c0a0eb 100644 --- a/ios/Capacitor/Capacitor/CAPUNUserNotificationCenterDelegate.swift +++ b/ios/Capacitor/Capacitor/CAPUNUserNotificationCenterDelegate.swift @@ -10,7 +10,9 @@ public class CAPUNUserNotificationCenterDelegate : NSObject, UNUserNotificationC public override init(){ super.init() let center = UNUserNotificationCenter.current() - center.delegate = self + if center.delegate == nil { + center.delegate = self + } } public func setBridge(bridge: CAPBridge) {