how do I start ptt

Asked on 2024-07-30

1 search

To start using broadcast push notifications for Live Activities, you can follow these steps as outlined in the session Broadcast updates to your Live Activities:

  1. Enable Broadcast Capability:

    • Go to the developer portal and enable the broadcast capability for your app under the push notifications section.
  2. Create a Channel:

    • Use the push notifications console to create a new channel. Navigate to the channels tab and select "New Channel". Configure the channel with the appropriate environment and message storage policy.
  3. Obtain Channel ID:

    • Once the channel is created, obtain its unique channel ID. This ID will be used by the app to subscribe for updates and by the server to send updates.
  4. Subscribe to Updates:

    • In your app, request the channel ID from your remote server when starting a live activity. Pass this ID to ActivityKit to subscribe for push updates on the specified channel.
  5. Send Broadcast Push Notifications:

    • Use the push notifications console to send broadcast push notifications. Select the channels tab, click on the created channel, and then click "New Notification". Fill in the required information, set the priority, and use the payload builder to add the content for your update. Finally, click send to broadcast the update to all devices.

For more detailed steps, you can refer to the specific sections in the session:

These steps will help you set up and start using broadcast push notifications for your Live Activities.