diff --git a/Examples/Example/Example/App.swift b/Examples/Example/Example/App.swift index 5c3abbe..87db381 100644 --- a/Examples/Example/Example/App.swift +++ b/Examples/Example/Example/App.swift @@ -15,7 +15,7 @@ struct App: ReducerProtocol { case remoteCountResponse(TaskResult) case requestAuthorizationResponse(TaskResult) case tappedScheduleButton - case userNotifications(UserNotificationClient.DeletegateAction) + case userNotifications(UserNotificationClient.DelegateAction) } @Dependency(\.remote) var remote diff --git a/Examples/Example/ExampleTests/ExampleTests.swift b/Examples/Example/ExampleTests/ExampleTests.swift index 722d585..17a2589 100644 --- a/Examples/Example/ExampleTests/ExampleTests.swift +++ b/Examples/Example/ExampleTests/ExampleTests.swift @@ -7,7 +7,7 @@ import XCTest @MainActor class ExampleTests: XCTestCase { func testApplicationLaunchWithoutNotification() async throws { - let delegate = AsyncStream.streamWithContinuation() + let delegate = AsyncStream.streamWithContinuation() let requestedAuthorizationOptions = ActorIsolated(nil) let store = TestStore( initialState: App.State(count: nil), @@ -27,7 +27,7 @@ class ExampleTests: XCTestCase { } func testApplicationLaunchWithtNotification() async throws { - let delegate = AsyncStream.streamWithContinuation() + let delegate = AsyncStream.streamWithContinuation() let requestedAuthorizationOptions = ActorIsolated(nil) let store = TestStore( @@ -51,7 +51,7 @@ class ExampleTests: XCTestCase { } func testNotificationPresentationHandling() async throws { - let delegate = AsyncStream.streamWithContinuation() + let delegate = AsyncStream.streamWithContinuation() let store = TestStore( initialState: App.State(count: nil), @@ -95,7 +95,7 @@ class ExampleTests: XCTestCase { } func testReceivedNotification() async throws { - let delegate = AsyncStream.streamWithContinuation() + let delegate = AsyncStream.streamWithContinuation() let store = TestStore( initialState: App.State(count: nil), diff --git a/Sources/ComposableUserNotifications/Interface.swift b/Sources/ComposableUserNotifications/Interface.swift index 1fc4e13..f72b238 100644 --- a/Sources/ComposableUserNotifications/Interface.swift +++ b/Sources/ComposableUserNotifications/Interface.swift @@ -14,7 +14,7 @@ public struct UserNotificationClient { /// Actions that correspond to `UNUserNotificationCenterDelegate` methods. /// /// See `UNUserNotificationCenterDelegate` for more information. - public enum DeletegateAction { + public enum DelegateAction { case willPresentNotification( _ notification: Notification, completionHandler: (UNNotificationPresentationOptions) -> Void) @@ -59,11 +59,11 @@ public struct UserNotificationClient { /// This Effect represents calls to the `UNUserNotificationCenterDelegate`. /// Handling the completion handlers of the `UNUserNotificationCenterDelegate`s methods /// by multiple observers might lead to unexpected behaviour. - public var delegate: @Sendable () -> AsyncStream = unimplemented("\(Self.self).delegate", placeholder: .finished) + public var delegate: @Sendable () -> AsyncStream = unimplemented("\(Self.self).delegate", placeholder: .finished) } -extension UserNotificationClient.DeletegateAction: Equatable { - public static func == (lhs: UserNotificationClient.DeletegateAction, rhs: UserNotificationClient.DeletegateAction) -> Bool { +extension UserNotificationClient.DelegateAction: Equatable { + public static func == (lhs: UserNotificationClient.DelegateAction, rhs: UserNotificationClient.DelegateAction) -> Bool { switch (lhs, rhs) { case let (.willPresentNotification(lhs, _), .willPresentNotification(rhs, _)): return lhs == rhs diff --git a/Sources/ComposableUserNotifications/LiveKey.swift b/Sources/ComposableUserNotifications/LiveKey.swift index 17fb01d..58c3acc 100644 --- a/Sources/ComposableUserNotifications/LiveKey.swift +++ b/Sources/ComposableUserNotifications/LiveKey.swift @@ -82,9 +82,9 @@ extension UserNotificationClient: DependencyKey { private extension UserNotificationClient { class Delegate: NSObject, UNUserNotificationCenterDelegate { - let continuation: AsyncStream.Continuation + let continuation: AsyncStream.Continuation - init(continuation: AsyncStream.Continuation) { + init(continuation: AsyncStream.Continuation) { self.continuation = continuation }