LiveActivityElectionBroadcastApp
iOS Live Election Results Demo App using Live Broadcast API
Install / Use
/learn @alfianlosari/LiveActivityElectionBroadcastAppREADME
Live Activity Broadcast Election Results iOS SwiftUI App

The app provides features where users can listen to realtime updates from the firestore elections collection
It also supports the new iOS Live Activity Broadcast feature using APNS Channel to display real time election activity from Lock Screen and Dynamic Island. Stacks used: iOS with SwiftUI for client, Firestore Database, Google Cloud Function with nodeJS 18 runtime.
Requirements
- Xcode 16 & iOS 18
- Replace the bundleID for the App with your own.
- Firebase iOS Project, download
GoogleService-info.plistto your Xcode project target. - Provide your Apple AuthKey.p8 with Apple Push Notification support in
firebase/functionsfolder. - Navigate to index.js in
firebase/functionsfolder. Provide your Apple account teamID, p8 filePath, bundleID of your app. - Update
.firebasercin `firebase`` folder to use your Firebase App projectID
Flow
- Store the election using firestore inside elections collection.
- Attach cloud functions to listen to create, update, and delete document to run server side code
- on create document will trigger code to create channelId using APNS channel management API, then it will write back the channelID to the document.
- On update document, will trigger code to broadcast live activity updates to all subscribed client devices
- On delete document, will trigger code to delete channelID using channel management API
- The iOS App listens to firestore collections for elections.
- The document contains channelId which user can use to start live activity with pushType Channel
YouTube Tutorial
You can check the full video tutorial on building this from scratch.
Related Skills
node-connect
347.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
