· PushTower Team
guidelive-activitiesios

Live Activities: Real-Time Updates on Your Lock Screen

iOS Live Activities let apps display real-time information on the lock screen and Dynamic Island. With PushTower, you can control them with a simple API — no Swift code required.

What Are Live Activities?

Live Activities are persistent, updating widgets that sit on your lock screen. Think of them as notifications that stay visible and change over time. They’re perfect for tracking things like:

Getting Started

If you already have PushTower set up, you’re ready to go. Live Activities work through the same channel system as regular notifications.

Start a Live Activity

curl -X POST https://api.pushtower.com/v1/live-activity \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "channel": "ci-builds",
    "event": "start",
    "content_state": {
      "status": "Building",
      "progress": 0.0,
      "message": "Starting build #1337..."
    }
  }'

Update It

As your process progresses, send updates:

curl -X POST https://api.pushtower.com/v1/live-activity \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "channel": "ci-builds",
    "event": "update",
    "content_state": {
      "status": "Testing",
      "progress": 0.8,
      "message": "142/178 tests passed..."
    }
  }'

End It

curl -X POST https://api.pushtower.com/v1/live-activity \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "channel": "ci-builds",
    "event": "end",
    "content_state": {
      "status": "Passed",
      "progress": 1.0,
      "message": "All 178 tests passed!"
    }
  }'

Tips

Check out the full Live Activities documentation for the complete API reference.