Open sgammon opened 1 week ago
Any way I can help ship this? That or, what's your ETA for completion brotha?
@ChrisCates Very close to completion, i'm testing on macOS shortly. I haven't explored Android yet, so some research there might help (how best to integrate Firebase Cloud Messaging - FCM - into tao
and tauri
; ideally it could work within the plugin only).
Windows is looking solid but I'm not sure how to extract the token yet. That may remain experimental until later if only because I can't find any third party push services that support WNS at this time.
tl;dr I'd say we could get macOS and potentially iOS working within a few days. Android and WNS are probably easier/less complex, but may take a few days longer for research about how best to integrate. Regarding review and merge, I've no clue, this is my first PR to Tauri.
Summary
Adds initial support wiring for Push Notifications (see: #11651).
This requires instrumentation down into
tao
, to call methods on theAppDelegate
orNSApplication
/UIApplication
(for Apple platforms). Firebase Messaging (FCM) support is also under consideration.tauri
: Handle new eventsPushRegistration
eventPushRegistrationFailed
eventtao
: Hooks intoUIApplication
/NSApplication
tauri-plugin-push-notifications
:await pushToken(...)
plugins-workspace
tauri-docs
PR Tree
This PR is accompanied by a plugin,
tauri-plugin-push-notifications
, and a PR totao
:Known Issues
How it works
(1)
tao
andtauri
forward two new events:PushRegistration(PushToken)
andPushRegistrationFailed(Error)
. (2) a new plugin,tauri-plugin-push-notifications
, listens for these events, holds the token or error, and exposes those values to guest code when requested.