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) 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 {