Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ await sendNotification({

#### Interactive Notifications with Actions

For provider-rendered iOS notifications, configure action types in the Tauri
`plugins.notifications.actionTypes` config so categories are registered before
APNs delivers a notification. The provider's `aps.category` must match `id`.

```typescript
import {
sendNotification,
Expand Down Expand Up @@ -284,8 +288,9 @@ await sendNotification({
});

// Listen for action events
const unlisten = await onAction((notification) => {
console.log('Action performed on notification:', notification);
const unlisten = await onAction(({ actionId, inputValue, notification }) => {
console.log('Action:', actionId, 'reply:', inputValue);
console.log('Routing metadata:', notification.extra);
});

// Stop listening
Expand Down
Loading