From 25f7e17b810f916524d6c1c6ee942828247506d3 Mon Sep 17 00:00:00 2001 From: Charles Dyason Date: Sun, 22 Jun 2025 10:11:39 +0200 Subject: [PATCH 1/2] fix: set notification center delegate to plugin self* Addresses generated notifications not showing on foreground app --- ios/Classes/SwiftTwilioVoicePlugin.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ios/Classes/SwiftTwilioVoicePlugin.swift b/ios/Classes/SwiftTwilioVoicePlugin.swift index 91647558..4928cce2 100644 --- a/ios/Classes/SwiftTwilioVoicePlugin.swift +++ b/ios/Classes/SwiftTwilioVoicePlugin.swift @@ -75,6 +75,8 @@ public class SwiftTwilioVoicePlugin: NSObject, FlutterPlugin, FlutterStreamHand voipRegistry.delegate = self voipRegistry.desiredPushTypes = Set([PKPushType.voIP]) + + UNUserNotificationCenter.current().delegate = self let appDelegate = UIApplication.shared.delegate guard let controller = appDelegate?.window??.rootViewController as? FlutterViewController else { From ed065343811dbe14f9c39967a071089f111036b1 Mon Sep 17 00:00:00 2001 From: Charles Dyason Date: Sun, 22 Jun 2025 10:18:03 +0200 Subject: [PATCH 2/2] docs: update CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8800c090..ee0cd0ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## Next Release + +* Fix: [iOS] Notifications not showing when app is in foreground. + ## 0.3.1 * Fix: [iOS] Fix `hangUp()` not ending incoming call when call is ringing. [Issue #244](https://github.com/cybex-dev/twilio_voice/issues/244)