An in-memory push client for Feather Push, intended for tests and local development.
- In-memory
PushClientimplementation - Topic and device-token notification capture
- Useful for tests and local development
- Swift 6 concurrency support
- Swift 6.1+
- Platforms:
- Linux
- macOS 15+
- iOS 18+
- tvOS 18+
- watchOS 11+
- visionOS 2+
Use Swift Package Manager; add the dependency to your Package.swift file:
.package(url: "https://github.com/feather-framework/feather-push-ephemeral", exact: "1.0.0-beta.2"),Then add FeatherPushEphemeral to your target dependencies:
.product(name: "FeatherPushEphemeral", package: "feather-push-ephemeral"),let client = PushClientEphemeral()
let notification = PushNotification(
title: "New message",
body: "You have a new message."
)
try await client.send(notification: notification, to: .topic("messages"))
try await client.send(
notification: notification,
to: .deviceToken("device-registration-token")
)
let captured = await client.getNotifications()getNotifications() returns each notification together with the destination
string that was supplied as either .topic(...) or .deviceToken(...).
Warning
This repository is a work in progress, things can break until it reaches v1.0.0.
- Build:
swift build - Test:
make test - Format:
make format - Check:
make check
Pull requests are welcome. Please keep changes focused and include tests for new logic.