Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
876 B · 26 lines
Swift
at main
123456789101112131415161718192021222324252627import Dependenciesimport DependenciesMacros
/// Provider-delivered notification events emitted by the host's platform delegate.////// The platform adapter owns the event source. ``NotificationsFeature`` owns decoding the/// provider payload and forwarding app-level content or source-available signals.@DependencyClientpublic struct NotificationEventClient: Sendable { public var events: @Sendable () async -> AsyncStream<NotificationEvent> = { AsyncStream { $0.finish() } }}
extension NotificationEventClient: TestDependencyKey { public static var testValue: Self { Self(events: { AsyncStream { $0.finish() } }) }}
extension DependencyValues { public var notificationEventClient: NotificationEventClient { get { self[NotificationEventClient.self] } set { self[NotificationEventClient.self] = newValue } }}