From c0b9e99ee3342b39474f5ce0517cc329974597b1 Mon Sep 17 00:00:00 2001 From: "Rakshitha ." Date: Mon, 3 Nov 2025 15:21:56 +0530 Subject: [PATCH 1/2] MOEN-41314: Fixed the issue of category not appearing with push notification --- CHANGELOG.md | 3 +- ...MoEngagePluginMessageDelegateHandler.swift | 39 ------------------- 2 files changed, 2 insertions(+), 40 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f223d72..0afa3bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,8 @@ ## Release Version -- [minor] Added Swift Package Manager distribution support +- [minor] Added Swift Package Manager distribution support. +- [patch] Fixed the issue of Category on Push notifications. # 17-10-2025 diff --git a/Sources/MoEngagePluginBase/MoEngagePluginMessageDelegateHandler.swift b/Sources/MoEngagePluginBase/MoEngagePluginMessageDelegateHandler.swift index ba9d31b..99c1734 100644 --- a/Sources/MoEngagePluginBase/MoEngagePluginMessageDelegateHandler.swift +++ b/Sources/MoEngagePluginBase/MoEngagePluginMessageDelegateHandler.swift @@ -26,30 +26,6 @@ final class MoEngagePluginMessageDelegateHandler: NSObject, MoEngageMessagingDel private func setMessagingDelegate() { MoEngageSDKMessaging.sharedInstance.setMessagingDelegate(self, forAppID: identifier) - - let current = UNUserNotificationCenter.current() - - current.getNotificationSettings(completionHandler: { (settings) in - switch settings.authorizationStatus { - case .authorized: - DispatchQueue.main.async { - - guard let sharedApplication = MoEngageCoreUtils.sharedUIApplication(), - sharedApplication.isRegisteredForRemoteNotifications - else { - return - } - - if let currentDelegate = UNUserNotificationCenter.current().delegate { - MoEngageSDKMessaging.sharedInstance.registerForRemoteNotification(withCategories: nil, andUserNotificationCenterDelegate: currentDelegate) - } else { - MoEngageSDKMessaging.sharedInstance.registerForRemoteNotification(withCategories: nil, andUserNotificationCenterDelegate: self) - } - } - default: - break - } - }) } func notificationRegistered(withDeviceToken deviceToken: String) { @@ -63,18 +39,3 @@ final class MoEngagePluginMessageDelegateHandler: NSObject, MoEngageMessagingDel } } - -@available(iOSApplicationExtension, unavailable) -@available(tvOS, unavailable) -extension MoEngagePluginMessageDelegateHandler: UNUserNotificationCenterDelegate { - func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) { - completionHandler([.alert, .sound]) - } - - #if !os(tvOS) - func userNotificationCenter(_ center: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) { - MoEngageSDKMessaging.sharedInstance.userNotificationCenter(center, didReceive: response) - completionHandler() - } - #endif -} From c5b8aa83eb6b0f7c02ab766e7164c7db617f3c9a Mon Sep 17 00:00:00 2001 From: "Rakshitha ." Date: Mon, 10 Nov 2025 10:17:43 +0530 Subject: [PATCH 2/2] MOEN-41314: Fixed changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0afa3bd..0442c12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Release Version -- [minor] Added Swift Package Manager distribution support. +- [minor] Added Swift Package Manager distribution support - [patch] Fixed the issue of Category on Push notifications. # 17-10-2025