Bus Alarm for Singapore
Never miss your bus again. BusRun tracks your bus arrival in real-time and alerts you when it's time to head to the stop.
Codename: Swell — the wave building before it breaks.
- 🚌 Real-time bus arrival via LTA DataMall API
- ⏱️ Live Activity countdown on Lock Screen & Dynamic Island (iOS 16.1+)
- 🔔 Smart alarms with configurable warnings (2/5/10 min)
- 🎯 Background monitoring with location updates
- 📍 Save favorite stops & routes
-
Clone
git clone https://github.com/tsuwave/BusAlarm.git cd BusAlarm -
Add API Key
cp Config/Secrets.template.xcconfig Config/Secrets.xcconfig # Edit Config/Secrets.xcconfig and add your LTA API key -
Open & Build
- Open
BusAlarm.xcodeprojin Xcode 15 or 16 - Select iPhone 15 Pro simulator
- Press Cmd+R
- Open
- Go to https://datamall.lta.gov.sg/content/datamall/en/request-for-api.html
- Register an account
- Request API access
- Copy your Account Key
We use GitHub Actions for automated builds and TestFlight deployment.
Every push to main or ios26-alarmkit triggers a build:
- View status: https://github.com/tsuwave/BusAlarm/actions
- Go to Actions → "Deploy to TestFlight"
- Click "Run workflow"
- Enter version (e.g., 1.0.0) and build number
- Click "Run workflow"
Add these in GitHub → Settings → Secrets → Actions:
| Secret | Value | How to Get |
|---|---|---|
LTA_API_KEY |
Your LTA DataMall API key | https://datamall.lta.gov.sg |
CERTIFICATES_P12 |
Base64-encoded Apple Distribution certificate | Export from Keychain |
CERTIFICATES_PASSWORD |
Certificate export password | Set when exporting |
APPSTORE_ISSUER_ID |
App Store Connect Issuer ID | App Store Connect → Users → Keys |
APPSTORE_KEY_ID |
App Store Connect Key ID | App Store Connect → Users → Keys |
APPSTORE_PRIVATE_KEY |
App Store Connect private key content | Download from App Store Connect |
Note: Requires an active Apple Developer account ($99/year) to generate certificates and API keys.
If not using GitHub Actions:
-
Set up signing
- In Xcode, select BusAlarm target
- Go to Signing & Capabilities
- Select your Team
- Update Bundle Identifier (e.g.,
com.yourname.busrun)
-
Archive
- Select target device: "Any iOS Device"
- Product → Archive
-
Upload
- In Organizer, select the archive
- Distribute App → App Store Connect → Upload
-
TestFlight
- Go to App Store Connect
- Select your app → TestFlight
- Add internal testers
main— Ready now — iOS 16.1+ with Live Activities + Local Notificationsios26-alarmkit— Experimental — iOS 26+ with AlarmKit system alarms
59009— Orchard (Bus 14)75009— Tampines (Bus 31)46009— Woodlands
TsuWave/
├── App/ # SwiftUI app entry point
├── Core/
│ ├── API/ # LTA API client
│ ├── Models/ # Data models
│ └── Services/ # Bus monitoring service
├── Features/
│ ├── Alarm/ # Alarm service (stubs in main)
│ └── LiveActivity/ # Live Activity widget
└── Resources/ # Info.plist, Assets
If you modify project.yml:
xcodegen generate- Background refresh limited by iOS (15 min - 6 hours)
- Location-based polling used for more frequent updates
- Requires "Always" location permission for best results
- TestFlight requires Apple Developer account ($99/year)
Built with 🌊 by TsuWave