-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: push notifications #11652
base: dev
Are you sure you want to change the base?
feat: push notifications #11652
Conversation
- feat(push): relay events for push notifications registration and errors to app - feat(push): gate apns by `push-notifications` feature Relates-To: tauri-apps#11651 Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Any way I can help ship this? |
@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 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. |
Relates-To: tauri-apps/tauri#11652 Relates-To: tauri-apps/tauri#11651 Signed-off-by: Sam Gammon <[email protected]>
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
push-notifications
plugin documentation tauri-docs#2997PR Tree
This PR is accompanied by a plugin,
tauri-plugin-push-notifications
, and a PR totao
:push-notifications
plugin documentation tauri-docs#2997Known Issues
Warning
This functionality is experimental and is gated behind the
push-notifications
feature for now.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.