Skip to content

felitrejos/ping

Repository files navigation

Ping

Ping app icon

Never miss your train or bus. FGC and TMB commute assistant for iPhone and Mac

Local-first commute planning powered by FGC and TMB schedule and realtime data

Ping on iOS — map, results, and home screens


Product Overview

Ping helps you choose a route fast and know exactly when to leave.

  • Track upcoming departures and delay-aware leave times
  • Save favorite stations for quick route switching
  • Get calendar-aware commute suggestions and iPhone leave reminders
  • Browse TMB bus stops on the map and tap a stop to see upcoming arrivals
  • See FGC service alerts in iOS and macOS

Status

Ping is open source and built to run from Xcode. There is no App Store or TestFlight build. That would require a paid Apple Developer Program license and I'm not paying for it. Until then:

  • iOS: clone the repo, open in Xcode, and run on your own device or Simulator.
  • macOS: either run from Xcode, or grab the unsigned Ping.dmg built locally via scripts/release-macos.sh (see RELEASE.md).

Build From Source

Requirements:

  • Xcode with iOS 26+ and macOS 26+ SDKs
  • xcodegen
  • protoc (only needed when regenerating GTFS Realtime generated code)
git clone https://github.com/felitrejos/ping.git
cd ping
xcodegen generate
open Ping.xcodeproj

Then select Ping iOS or Ping macOS and run. The iOS target needs a free personal Apple ID signed into Xcode to run on a physical device.

TMB API keys (iOS only)

TMB map stops and iBus arrivals need API keys. Without them the FGC side of the app works fine, but the TMB map layer stays empty.

  1. Copy iOS/Config/TMBKeys.example.xcconfig to iOS/Config/TMBKeys.xcconfig.
  2. Fill in:
    • TMB_APP_ID_PRIMARY
    • TMB_APP_KEY_PRIMARY
    • TMB_APP_ID_BACKUP
    • TMB_APP_KEY_BACKUP

TMBKeys.xcconfig is gitignored and picked up by the iOS target config.


Quick Start (in-app)

  1. Launch iOS or macOS target from Xcode.
  2. Pick origin and destination stations.
  3. Tap Search routes.
  4. Optionally add favorite stations in Settings.
  5. Enable location/calendar access for walking ETA and commute suggestions.

Architecture

  • Swift + SwiftUI multi-target app (iOS/, macOS/)
  • Shared domain and services in Shared/
  • FGC GTFS static + GTFS-Realtime ingestion
  • TMB GTFS static + iBus arrivals ingestion (iOS map)
  • Dependencies:
    • SwiftProtobuf
    • ZIPFoundation

If you need to regenerate protobuf models:

protoc --swift_out=Shared/Generated Proto/gtfs-realtime.proto

Project Layout

ping/
├── Shared/              # shared models, services, engine, settings views
├── iOS/                 # iPhone app
├── macOS/               # menu bar app
├── Tests/PingSharedTests/
├── Resources/
└── Proto/

Testing

Run shared tests:

swift test

Development Notes

project.yml is the source of truth for the Xcode project.

Regenerate the project after target/dependency changes:

xcodegen generate

Unsigned macOS DMG build: see RELEASE.md.


License

MIT

About

Commute assistant for iPhone and macOS.

Topics

Resources

License

Stars

Watchers

Forks

Contributors