From f867226cda0842f670e1d11543cca0bd7ae4c1dd Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Tue, 15 Oct 2024 10:52:40 +1100 Subject: [PATCH] Fixed the broken unit tests --- Session.xcodeproj/project.pbxproj | 14 +- .../Migrations/_001_ThemePreferences.swift | 4 +- Session/Meta/AppDelegate.swift | 4 +- .../Notifications/NotificationPresenter.swift | 4 + .../Database/Models/Interaction.swift | 13 +- .../Notifications/NotificationsProtocol.swift | 3 + .../MessageReceiverGroupsSpec.swift | 196 ++++++------------ .../MockNotificationsManager.swift | 4 + .../NSENotificationPresenter.swift | 2 + 9 files changed, 92 insertions(+), 152 deletions(-) diff --git a/Session.xcodeproj/project.pbxproj b/Session.xcodeproj/project.pbxproj index 69dbef681..7a1d28281 100644 --- a/Session.xcodeproj/project.pbxproj +++ b/Session.xcodeproj/project.pbxproj @@ -3784,8 +3784,8 @@ FDFE75B02ABD2D2400655640 /* _016_MakeBrokenProfileTimestampsNullable.swift */, FD428B222B4B9969006D0888 /* _017_RebuildFTSIfNeeded_2_4_5.swift */, 7B5233C5290636D700F8F375 /* _018_DisappearingMessagesConfiguration.swift */, - FDB5DAC62A9447E7002C8721 /* _020_GroupsRebuildChanges.swift */, FDDD554D2C1FCB77006CBF03 /* _019_ScheduleAppUpdateCheckJob.swift */, + FDB5DAC62A9447E7002C8721 /* _020_GroupsRebuildChanges.swift */, ); path = Migrations; sourceTree = ""; @@ -5463,7 +5463,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - FD0B1FA92CA3805C00F60F46 /* Ensure InfoPlist.xcstrings updated */ = { + 9471CAA62CACFB0600090FB7 /* Generate Licenses Plist */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; buildActionMask = 2147483647; @@ -5473,17 +5473,17 @@ ); inputPaths = ( ); - name = "Ensure InfoPlist.xcstrings updated"; + name = "Generate Licenses Plist"; outputFileListPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Scripts/LintLocalizableStrings.swift\" update\n"; + shellScript = "\"${SRCROOT}/Scripts/GenerateLicenses.swift\"\n"; showEnvVarsInLog = 0; }; - 9471CAA62CACFB0600090FB7 /* Generate Licenses Plist */ = { + FD0B1FA92CA3805C00F60F46 /* Ensure InfoPlist.xcstrings updated */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; buildActionMask = 2147483647; @@ -5493,14 +5493,14 @@ ); inputPaths = ( ); - name = "Generate Licenses Plist"; + name = "Ensure InfoPlist.xcstrings updated"; outputFileListPaths = ( ); outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Scripts/GenerateLicenses.swift\"\n"; + shellScript = "\"${SRCROOT}/Scripts/LintLocalizableStrings.swift\" update\n"; showEnvVarsInLog = 0; }; FD5E93D32C12D3990038C25A /* Add App Group To Build Info Plist */ = { diff --git a/Session/Database/Migrations/_001_ThemePreferences.swift b/Session/Database/Migrations/_001_ThemePreferences.swift index 0dfa58167..ff03abfc2 100644 --- a/Session/Database/Migrations/_001_ThemePreferences.swift +++ b/Session/Database/Migrations/_001_ThemePreferences.swift @@ -46,8 +46,8 @@ enum _001_ThemePreferences: Migration { } } -extension Theme: EnumStringSetting {} -extension Theme.PrimaryColor: EnumStringSetting {} +extension Theme: @retroactive EnumStringSetting {} +extension Theme.PrimaryColor: @retroactive EnumStringSetting {} enum DeprecatedUIKitMigrationTarget: MigratableTarget { public static func migrations() -> TargetMigrations { diff --git a/Session/Meta/AppDelegate.swift b/Session/Meta/AppDelegate.swift index d10921636..58e38ba59 100644 --- a/Session/Meta/AppDelegate.swift +++ b/Session/Meta/AppDelegate.swift @@ -154,7 +154,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD // miss notifications. // Setting the delegate also seems to prevent us from getting the legacy notification // notification callbacks upon launch e.g. 'didReceiveLocalNotification' - UNUserNotificationCenter.current().delegate = self + dependencies[singleton: .notificationsManager].setDelegate(self) NotificationCenter.default.addObserver( self, @@ -177,7 +177,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD /// springboard without swapping to another app) - adding this here in addition to the one in /// `appDidFinishLaunching` seems to fix this odd behaviour (even though it doesn't match /// Apple's documentation on the matter) - UNUserNotificationCenter.current().delegate = self + dependencies[singleton: .notificationsManager].setDelegate(self) dependencies[singleton: .storage].resumeDatabaseAccess() dependencies.mutate(cache: .libSessionNetwork) { $0.resumeNetworkAccess() } diff --git a/Session/Notifications/NotificationPresenter.swift b/Session/Notifications/NotificationPresenter.swift index 1cfa837bc..a8b88ceb1 100644 --- a/Session/Notifications/NotificationPresenter.swift +++ b/Session/Notifications/NotificationPresenter.swift @@ -26,6 +26,10 @@ public class NotificationPresenter: NSObject, UNUserNotificationCenterDelegate, // MARK: - Registration + public func setDelegate(_ delegate: (any UNUserNotificationCenterDelegate)?) { + notificationCenter.delegate = delegate + } + public func registerNotificationSettings() -> AnyPublisher { return Deferred { [notificationCenter] in Future { resolver in diff --git a/SessionMessagingKit/Database/Models/Interaction.swift b/SessionMessagingKit/Database/Models/Interaction.swift index 93274173a..69cb7be89 100644 --- a/SessionMessagingKit/Database/Models/Interaction.swift +++ b/SessionMessagingKit/Database/Models/Interaction.swift @@ -1246,13 +1246,12 @@ public extension Interaction { } /// Remove any notifications for the messages - let notificationIdentifiers: [String] = interactionIds.reduce(into: []) { result, id in - result.append(Interaction.notificationIdentifier(for: id, threadId: threadId, shouldGroupMessagesForThread: true)) - result.append(Interaction.notificationIdentifier(for: id, threadId: threadId, shouldGroupMessagesForThread: false)) - } - - UNUserNotificationCenter.current().removeDeliveredNotifications(withIdentifiers: notificationIdentifiers) - UNUserNotificationCenter.current().removePendingNotificationRequests(withIdentifiers: notificationIdentifiers) + dependencies[singleton: .notificationsManager].cancelNotifications( + identifiers: interactionIds.reduce(into: []) { result, id in + result.append(Interaction.notificationIdentifier(for: id, threadId: threadId, shouldGroupMessagesForThread: true)) + result.append(Interaction.notificationIdentifier(for: id, threadId: threadId, shouldGroupMessagesForThread: false)) + } + ) /// Retrieve any attachments for the messages let attachments: [Attachment] = try Attachment diff --git a/SessionMessagingKit/Sending & Receiving/Notifications/NotificationsProtocol.swift b/SessionMessagingKit/Sending & Receiving/Notifications/NotificationsProtocol.swift index 604d4729a..43e1b572c 100644 --- a/SessionMessagingKit/Sending & Receiving/Notifications/NotificationsProtocol.swift +++ b/SessionMessagingKit/Sending & Receiving/Notifications/NotificationsProtocol.swift @@ -19,6 +19,7 @@ public extension Singleton { public protocol NotificationsManagerType { init(using dependencies: Dependencies) + func setDelegate(_ delegate: (any UNUserNotificationCenterDelegate)?) func registerNotificationSettings() -> AnyPublisher func notifyUser( @@ -41,6 +42,8 @@ public protocol NotificationsManagerType { public struct NoopNotificationsManager: NotificationsManagerType { public init(using dependencies: Dependencies) {} + public func setDelegate(_ delegate: (any UNUserNotificationCenterDelegate)?) {} + public func registerNotificationSettings() -> AnyPublisher { return Just(()).eraseToAnyPublisher() } diff --git a/SessionMessagingKitTests/Sending & Receiving/MessageReceiverGroupsSpec.swift b/SessionMessagingKitTests/Sending & Receiving/MessageReceiverGroupsSpec.swift index 01e14a22a..7020db64a 100644 --- a/SessionMessagingKitTests/Sending & Receiving/MessageReceiverGroupsSpec.swift +++ b/SessionMessagingKitTests/Sending & Receiving/MessageReceiverGroupsSpec.swift @@ -2153,7 +2153,7 @@ class MessageReceiverGroupsSpec: QuickSpec { threadId: groupId.hexString, authorId: "051111111111111111111111111111111111111111111111111111111111111111", variant: .standardIncoming, - body: "Test", + body: "Test1", timestampMs: 1234560000001, receivedAtTimestampMs: 1234560000001, wasRead: false, @@ -2174,7 +2174,7 @@ class MessageReceiverGroupsSpec: QuickSpec { threadId: groupId.hexString, authorId: "051111111111111111111111111111111111111111111111111111111111111111", variant: .standardIncoming, - body: "Test", + body: "Test2", timestampMs: 1234567890002, receivedAtTimestampMs: 1234567890002, wasRead: false, @@ -2195,7 +2195,7 @@ class MessageReceiverGroupsSpec: QuickSpec { threadId: groupId.hexString, authorId: "051111111111111111111111111111111111111111111111111111111111111112", variant: .standardIncoming, - body: "Test", + body: "Test3", timestampMs: 1234560000003, receivedAtTimestampMs: 1234560000003, wasRead: false, @@ -2216,7 +2216,7 @@ class MessageReceiverGroupsSpec: QuickSpec { threadId: groupId.hexString, authorId: "051111111111111111111111111111111111111111111111111111111111111112", variant: .standardIncoming, - body: "Test", + body: "Test4", timestampMs: 1234567890004, receivedAtTimestampMs: 1234567890004, wasRead: false, @@ -2292,8 +2292,8 @@ class MessageReceiverGroupsSpec: QuickSpec { // MARK: ---- and there is no admin signature context("and there is no admin signature") { - // MARK: ------ removes specific messages from the database - it("removes specific messages from the database") { + // MARK: ------ removes content for specific messages from the database + it("removes content for specific messages from the database") { deleteContentMessage = GroupUpdateDeleteMemberContentMessage( memberSessionIds: [], messageHashes: ["TestMessageHash3"], @@ -2313,24 +2313,13 @@ class MessageReceiverGroupsSpec: QuickSpec { } let interactions: [Interaction]? = mockStorage.read { db in try Interaction.fetchAll(db) } - expect(interactions?.count).to(equal(3)) - expect(interactions?.map { $0.serverHash }).to(equal([ - "TestMessageHash1", "TestMessageHash2", "TestMessageHash4" - ])) - expect(interactions?.map { $0.authorId }).to(equal([ - "051111111111111111111111111111111111111111111111111111111111111111", - "051111111111111111111111111111111111111111111111111111111111111111", - "051111111111111111111111111111111111111111111111111111111111111112" - ])) - expect(interactions?.map { $0.timestampMs }).to(equal([ - 1234560000001, - 1234567890002, - 1234567890004 - ])) + expect(interactions?.count).to(equal(4)) // Message isn't deleted, just content + expect(interactions?.map { $0.serverHash }).toNot(contain("TestMessageHash3")) + expect(interactions?.map { $0.body }).toNot(contain("Test3")) } - // MARK: ------ removes all messages from the sender from the database - it("removes all messages from the sender from the database") { + // MARK: ------ removes content for all messages from the sender from the database + it("removes content for all messages from the sender from the database") { deleteContentMessage = GroupUpdateDeleteMemberContentMessage( memberSessionIds: [ "051111111111111111111111111111111111111111111111111111111111111112" @@ -2352,20 +2341,9 @@ class MessageReceiverGroupsSpec: QuickSpec { } let interactions: [Interaction]? = mockStorage.read { db in try Interaction.fetchAll(db) } - expect(interactions?.count).to(equal(3)) - expect(interactions?.map { $0.serverHash }).to(equal([ - "TestMessageHash1", "TestMessageHash2", "TestMessageHash4" - ])) - expect(interactions?.map { $0.authorId }).to(equal([ - "051111111111111111111111111111111111111111111111111111111111111111", - "051111111111111111111111111111111111111111111111111111111111111111", - "051111111111111111111111111111111111111111111111111111111111111112" - ])) - expect(interactions?.map { $0.timestampMs }).to(equal([ - 1234560000001, - 1234567890002, - 1234567890004 - ])) + expect(interactions?.count).to(equal(4)) // Message isn't deleted, just content + expect(interactions?.map { $0.serverHash }).toNot(contain("TestMessageHash3")) + expect(interactions?.map { $0.body }).toNot(contain("Test3")) } // MARK: ------ ignores messages not sent by the sender @@ -2389,18 +2367,26 @@ class MessageReceiverGroupsSpec: QuickSpec { } let interactions: [Interaction]? = mockStorage.read { db in try Interaction.fetchAll(db) } - expect(interactions?.count).to(equal(3)) + expect(interactions?.count).to(equal(4)) expect(interactions?.map { $0.serverHash }).to(equal([ - "TestMessageHash1", "TestMessageHash2", "TestMessageHash4" + "TestMessageHash1", "TestMessageHash2", nil, "TestMessageHash4" + ])) + expect(interactions?.map { $0.body }).to(equal([ + "Test1", + "Test2", + nil, + "Test4" ])) expect(interactions?.map { $0.authorId }).to(equal([ "051111111111111111111111111111111111111111111111111111111111111111", "051111111111111111111111111111111111111111111111111111111111111111", + "051111111111111111111111111111111111111111111111111111111111111112", "051111111111111111111111111111111111111111111111111111111111111112" ])) expect(interactions?.map { $0.timestampMs }).to(equal([ 1234560000001, 1234567890002, + 1234560000003, 1234567890004 ])) } @@ -2426,18 +2412,26 @@ class MessageReceiverGroupsSpec: QuickSpec { } let interactions: [Interaction]? = mockStorage.read { db in try Interaction.fetchAll(db) } - expect(interactions?.count).to(equal(3)) + expect(interactions?.count).to(equal(4)) expect(interactions?.map { $0.serverHash }).to(equal([ - "TestMessageHash1", "TestMessageHash2", "TestMessageHash4" + "TestMessageHash1", "TestMessageHash2", nil, "TestMessageHash4" + ])) + expect(interactions?.map { $0.body }).to(equal([ + "Test1", + "Test2", + nil, + "Test4" ])) expect(interactions?.map { $0.authorId }).to(equal([ "051111111111111111111111111111111111111111111111111111111111111111", "051111111111111111111111111111111111111111111111111111111111111111", + "051111111111111111111111111111111111111111111111111111111111111112", "051111111111111111111111111111111111111111111111111111111111111112" ])) expect(interactions?.map { $0.timestampMs }).to(equal([ 1234560000001, 1234567890002, + 1234560000003, 1234567890004 ])) } @@ -2445,8 +2439,8 @@ class MessageReceiverGroupsSpec: QuickSpec { // MARK: ---- and there is no admin signature context("and there is no admin signature") { - // MARK: ------ removes specific messages from the database - it("removes specific messages from the database") { + // MARK: ------ removes content for specific messages from the database + it("removes content for specific messages from the database") { deleteContentMessage = GroupUpdateDeleteMemberContentMessage( memberSessionIds: [], messageHashes: ["TestMessageHash3"], @@ -2466,24 +2460,13 @@ class MessageReceiverGroupsSpec: QuickSpec { } let interactions: [Interaction]? = mockStorage.read { db in try Interaction.fetchAll(db) } - expect(interactions?.count).to(equal(3)) - expect(interactions?.map { $0.serverHash }).to(equal([ - "TestMessageHash1", "TestMessageHash2", "TestMessageHash4" - ])) - expect(interactions?.map { $0.authorId }).to(equal([ - "051111111111111111111111111111111111111111111111111111111111111111", - "051111111111111111111111111111111111111111111111111111111111111111", - "051111111111111111111111111111111111111111111111111111111111111112" - ])) - expect(interactions?.map { $0.timestampMs }).to(equal([ - 1234560000001, - 1234567890002, - 1234567890004 - ])) + expect(interactions?.count).to(equal(4)) + expect(interactions?.map { $0.serverHash }).toNot(contain("TestMessageHash3")) + expect(interactions?.map { $0.body }).toNot(contain("Test3")) } - // MARK: ------ removes all messages for a given id from the database - it("removes all messages for a given id from the database") { + // MARK: ------ removes content for all messages for a given id from the database + it("removes content for all messages for a given id from the database") { deleteContentMessage = GroupUpdateDeleteMemberContentMessage( memberSessionIds: [ "051111111111111111111111111111111111111111111111111111111111111112" @@ -2505,24 +2488,13 @@ class MessageReceiverGroupsSpec: QuickSpec { } let interactions: [Interaction]? = mockStorage.read { db in try Interaction.fetchAll(db) } - expect(interactions?.count).to(equal(3)) - expect(interactions?.map { $0.serverHash }).to(equal([ - "TestMessageHash1", "TestMessageHash2", "TestMessageHash4" - ])) - expect(interactions?.map { $0.authorId }).to(equal([ - "051111111111111111111111111111111111111111111111111111111111111111", - "051111111111111111111111111111111111111111111111111111111111111111", - "051111111111111111111111111111111111111111111111111111111111111112" - ])) - expect(interactions?.map { $0.timestampMs }).to(equal([ - 1234560000001, - 1234567890002, - 1234567890004 - ])) + expect(interactions?.count).to(equal(4)) + expect(interactions?.map { $0.serverHash }).toNot(contain("TestMessageHash3")) + expect(interactions?.map { $0.body }).toNot(contain("Test3")) } - // MARK: ------ removes specific messages sent from a user that is not the sender from the database - it("removes specific messages sent from a user that is not the sender from the database") { + // MARK: ------ removes content for specific messages sent from a user that is not the sender from the database + it("removes content for specific messages sent from a user that is not the sender from the database") { deleteContentMessage = GroupUpdateDeleteMemberContentMessage( memberSessionIds: [], messageHashes: ["TestMessageHash3"], @@ -2542,24 +2514,13 @@ class MessageReceiverGroupsSpec: QuickSpec { } let interactions: [Interaction]? = mockStorage.read { db in try Interaction.fetchAll(db) } - expect(interactions?.count).to(equal(3)) - expect(interactions?.map { $0.serverHash }).to(equal([ - "TestMessageHash1", "TestMessageHash2", "TestMessageHash4" - ])) - expect(interactions?.map { $0.authorId }).to(equal([ - "051111111111111111111111111111111111111111111111111111111111111111", - "051111111111111111111111111111111111111111111111111111111111111111", - "051111111111111111111111111111111111111111111111111111111111111112" - ])) - expect(interactions?.map { $0.timestampMs }).to(equal([ - 1234560000001, - 1234567890002, - 1234567890004 - ])) + expect(interactions?.count).to(equal(4)) + expect(interactions?.map { $0.serverHash }).toNot(contain("TestMessageHash3")) + expect(interactions?.map { $0.body }).toNot(contain("Test3")) } - // MARK: ------ removes all messages for a given id that is not the sender from the database - it("removes all messages for a given id that is not the sender from the database") { + // MARK: ------ removes content for all messages for a given id that is not the sender from the database + it("removes content for all messages for a given id that is not the sender from the database") { deleteContentMessage = GroupUpdateDeleteMemberContentMessage( memberSessionIds: [ "051111111111111111111111111111111111111111111111111111111111111112" @@ -2581,20 +2542,9 @@ class MessageReceiverGroupsSpec: QuickSpec { } let interactions: [Interaction]? = mockStorage.read { db in try Interaction.fetchAll(db) } - expect(interactions?.count).to(equal(3)) - expect(interactions?.map { $0.serverHash }).to(equal([ - "TestMessageHash1", "TestMessageHash2", "TestMessageHash4" - ])) - expect(interactions?.map { $0.authorId }).to(equal([ - "051111111111111111111111111111111111111111111111111111111111111111", - "051111111111111111111111111111111111111111111111111111111111111111", - "051111111111111111111111111111111111111111111111111111111111111112" - ])) - expect(interactions?.map { $0.timestampMs }).to(equal([ - 1234560000001, - 1234567890002, - 1234567890004 - ])) + expect(interactions?.count).to(equal(4)) + expect(interactions?.map { $0.serverHash }).toNot(contain("TestMessageHash3")) + expect(interactions?.map { $0.body }).toNot(contain("Test3")) } // MARK: ------ ignores messages sent after the delete content message was sent @@ -2621,16 +2571,20 @@ class MessageReceiverGroupsSpec: QuickSpec { } let interactions: [Interaction]? = mockStorage.read { db in try Interaction.fetchAll(db) } - expect(interactions?.count).to(equal(2)) + expect(interactions?.count).to(equal(4)) expect(interactions?.map { $0.serverHash }).to(equal([ - "TestMessageHash2", "TestMessageHash4" + nil, "TestMessageHash2", nil, "TestMessageHash4" ])) expect(interactions?.map { $0.authorId }).to(equal([ "051111111111111111111111111111111111111111111111111111111111111111", + "051111111111111111111111111111111111111111111111111111111111111111", + "051111111111111111111111111111111111111111111111111111111111111112", "051111111111111111111111111111111111111111111111111111111111111112" ])) expect(interactions?.map { $0.timestampMs }).to(equal([ + 1234560000001, 1234567890002, + 1234560000003, 1234567890004 ])) } @@ -2652,8 +2606,8 @@ class MessageReceiverGroupsSpec: QuickSpec { } } - // MARK: ------ deletes the messages from the swarm if the sender was not an admin - it("deletes the messages from the swarm if the sender was not an admin") { + // MARK: ------ deletes the messages from the swarm + it("deletes the messages from the swarm") { deleteContentMessage = GroupUpdateDeleteMemberContentMessage( memberSessionIds: [], messageHashes: ["TestMessageHash3"], @@ -2693,32 +2647,6 @@ class MessageReceiverGroupsSpec: QuickSpec { ) }) } - - // MARK: ------ does not delete the messages from the swarm if the sender was an admin - it("does not delete the messages from the swarm if the sender was an admin") { - deleteContentMessage = GroupUpdateDeleteMemberContentMessage( - memberSessionIds: [], - messageHashes: ["TestMessageHash3"], - adminSignature: .standard(signature: "TestSignature".bytes) - ) - deleteContentMessage.sender = "051111111111111111111111111111111111111111111111111111111111111112" - deleteContentMessage.sentTimestampMs = 1234567800000 - - mockStorage.write { db in - try MessageReceiver.handleGroupUpdateMessage( - db, - threadId: groupId.hexString, - threadVariant: .group, - message: deleteContentMessage, - using: dependencies - ) - } - - expect(mockNetwork) - .toNot(call { network in - network.send(.any, to: .any, requestTimeout: .any, requestAndPathBuildTimeout: .any) - }) - } } // MARK: ---- and the current user is not an admin diff --git a/SessionMessagingKitTests/_TestUtilities/MockNotificationsManager.swift b/SessionMessagingKitTests/_TestUtilities/MockNotificationsManager.swift index f8f74e639..bb083074f 100644 --- a/SessionMessagingKitTests/_TestUtilities/MockNotificationsManager.swift +++ b/SessionMessagingKitTests/_TestUtilities/MockNotificationsManager.swift @@ -17,6 +17,10 @@ public class MockNotificationsManager: Mock, Notificat super.init(functionHandler: functionHandler, initialSetup: initialSetup) } + public func setDelegate(_ delegate: (any UNUserNotificationCenterDelegate)?) { + mockNoReturn(args: [delegate]) + } + public func registerNotificationSettings() -> AnyPublisher { return mock() } diff --git a/SessionNotificationServiceExtension/NSENotificationPresenter.swift b/SessionNotificationServiceExtension/NSENotificationPresenter.swift index d494ed76e..944e0b621 100644 --- a/SessionNotificationServiceExtension/NSENotificationPresenter.swift +++ b/SessionNotificationServiceExtension/NSENotificationPresenter.swift @@ -20,6 +20,8 @@ public class NSENotificationPresenter: NotificationsManagerType { // MARK: - Registration + public func setDelegate(_ delegate: (any UNUserNotificationCenterDelegate)?) {} + public func registerNotificationSettings() -> AnyPublisher { return Just(()).eraseToAnyPublisher() }