Fill guide to push notifications
Generated on 8/13/2024
1 search
To set up and send broadcast push notifications for Live Activities, you can follow these steps as outlined in the session "Broadcast updates to your Live Activities" from WWDC 2024:
-
Enable Broadcast Capability:
- Use the developer portal to enable the new broadcast capability under push notifications for your app.
-
Create a Channel:
- Navigate to the push notifications console, go to the channels tab, and create a new channel. This involves configuring the environment and message storage policy.
-
Subscribe to Updates:
- Use ActivityKit in your app to subscribe to live activity updates using the new channel push type. This involves passing the channel ID to subscribe for updates.
-
Send Broadcast Push Notifications:
- Use the push notifications console to send your first broadcast push. Select the channel, create a new notification, and use the payload builder to add content. Set the priority and send the notification.
-
Channel Management:
- Manage the lifecycle of channels using the channel management API. Delete old or unused channels when they are no longer needed.
For more detailed guidance, you can refer to the session chapter markers, particularly the sections on "Get started" and "Send broadcast push notifications". Here is a link to the relevant section on sending notifications: Send broadcast push notifications.