Skip to content

Channel-based Live Activity Update #155

@sdzfg347

Description

@sdzfg347

First of All! Thank you for the easy-to-use plugin.

I have configured my app to work with the current plugin with the token-based push notification.

So the current flow is

  1. User creates an activity
  2. Frontend registers the activityId and push token to backend
  3. Backend sends the updated content-states to APNs via ':path': /3/device/${pushToken} to the target user

I have made this flow work, and the device can receive live activity updates via push notification events when the app is killed.

However, we are facing a challenge with a token-based push notification strategy. If there are 1000 users who created activity on the same event, then the backend will need to send 1000 POST requests to Apple's APNs.

Instead, we are wondering if this package supports channel-based broadcast push notification as listed here
https://developer.apple.com/documentation/activitykit/starting-and-updating-live-activities-with-activitykit-push-notifications

To start and update your Live Activities with ActivityKit push notifications on a channel:
Enable broadcast capabilities for your app as described in Setting up broadcast push notifications.
...

For example, the createActivity listens to a match-specific channel

  await createActivity(
    data,
    channelId: '$channelId', // ← Same for all users
  );

And backend sends the push notification channel-specific, not user-specific, by specifying apns-channel-id

Not too sure if the plugin already supports this, or if there is any guide or suggestion would be much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions