Firebase Cloud Messaging support for Feather Push using topic and device-token delivery.
PushClientimplementation backed by FCM HTTP v1- Topic and device-token delivery
- Firebase service-account authentication
- Deep-link and provider metadata support
- Swift 6 concurrency support
- Swift 6.3+
- macOS 15+, iOS 18+, tvOS 18+, watchOS 11+, or visionOS 2+
- A Firebase service account with FCM permissions
.package(url: "https://github.com/feather-framework/feather-push-fcm", exact: "1.0.0-rc.1"),
Add FeatherPushFCM to the target dependencies:
.product(name: "FeatherPushFCM", package: "feather-push-fcm"),
API documentation is available at the following link.
let client = PushClientFCM( httpClient: httpClient, credentials: credentials ) let notification = PushNotification( title: "New message", body: "You have a new message.", deepLink: "my-app://messages/1" ) try await client.send(notification: notification, to: .topic("messages")) try await client.send( notification: notification, to: .deviceToken("device-registration-token") )
The package uses Logger.current from swift-log for FCM request logging. Use withLogger to scope the logger for an operation; calls to Logger.current within that scope use the scoped logger.
- 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.