Skip to content

Repository files navigation

Feather Push Ephemeral

An in-memory push client for Feather Push, intended for tests and local development.

Release: 1.0.0-beta.2

Features

  • In-memory PushClient implementation
  • Topic and device-token notification capture
  • Useful for tests and local development
  • Swift 6 concurrency support

Requirements

Swift 6.1+ Platforms: Linux, macOS, iOS, tvOS, watchOS, visionOS

  • Swift 6.1+
  • Platforms:
    • Linux
    • macOS 15+
    • iOS 18+
    • tvOS 18+
    • watchOS 11+
    • visionOS 2+

Installation

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"),

Usage

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.

Development

  • Build: swift build
  • Test: make test
  • Format: make format
  • Check: make check

Contributing

Pull requests are welcome. Please keep changes focused and include tests for new logic.

About

In-memory push client for Feather Push, designed for tests and local development.

Topics

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Used by

Contributors

Languages