GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - feather-framework/feather-push: An abstract push client for Feather CMS

BranchesTags
Open more actions menu

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
Sources
Sources
 
 
Tests
Tests
 
 
docker/tests
docker/tests
 
 
.gitignore
.gitignore
 
 
.swift-format
.swift-format
 
 
.swiftformatignore
.swiftformatignore
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
Package.resolved
Package.resolved
 
 
Package.swift
Package.swift
 
 
README.md
README.md
 
 

Repository files navigation

Feather Push

An abstract push notification client for Feather CMS.

Release: 1.0.0-rc.1

Features

  • Topic- and device-token-based push notification delivery
  • Silent and normal delivery modes
  • Deep-link and rich notification metadata
  • Badge, sound, and notification collapsing support
  • Provider-neutral client and error APIs

Requirements

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

  • Swift 6.3+
  • 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", exact: "1.0.0-rc.1"),

Then add FeatherPush to your target dependencies:

.product(name: "FeatherPush", package: "feather-push"),

For in-memory test support, add FeatherPushTesting to your test target:

.product(name: "FeatherPushTesting", package: "feather-push"),

TestPushClient records notifications and destinations in a shared, actor-isolated TestPushState that tests can inspect and clear.

Usage

DocC API documentation

API documentation is available at the following link.

PushClient accepts a single delivery target for every notification.

Providers do not all support the same targeting model. For example, FCM supports subscribable topics, while APNs delivers to device tokens and uses its topic value to identify the application rather than a group of subscribers. An implementation that cannot handle a target should throw PushClientError.unsupportedTarget.

let notification = PushNotification(
    title: "New message",
    body: "You have a new message.",
    data: ["messageID": "123"],
    deepLink: "myapp://messages/123",
    badge: 1,
    sound: .default
)

// Device-token delivery is supported by every PushClient implementation.
func sendDeviceNotification(using client: some PushClient) async throws {
    try await client.send(
        notification: notification,
        to: .deviceToken("device-registration-token")
    )
}

The same interface can target a provider-managed topic:

func sendTopicNotification(using client: some PushClient) async throws {
    try await client.send(
        notification: notification,
        to: .topic("messages")
    )
}

Warning

This repository is a work in progress, things can break until it reaches v1.0.0.

Push implementations

The following push client implementations are available for use:

  • Feather Push APNS
  • Feather Push FCM

Development

  • Build: swift build
  • Test:
    • local: make test
    • using Docker: make docker-test
  • Format: make format
  • Check: make check

Contributing

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

About

An abstract push client for Feather CMS

Topics

pushpush-notificationsserver-side-swiftswiftswift6

Resources

Readme
MIT license
Activity
Custom properties

Stars

0 stars

Watchers

2 watching

Forks

0 forks
Report repository

Releases

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.