Skip to content

moritzwade/UpThere

Repository files navigation

UpThere

Real-time airplane flight tracker for macOS and iOS.

Features

  • Live flight tracking on an interactive map
  • Flight details: altitude, speed, heading, coordinates
  • Automatic refresh every 5 seconds
  • Adaptive UI: split view on iPad, tab view on iPhone

Setup

1. OpenSky Account (optional)

For higher rate limits, create a free account at opensky-network.org and create an API client:

  1. Log in to your OpenSky account
  2. Go to Account page
  3. Create a new API client to get client_id and client_secret

Set environment variables:

export OPENSKY_CLIENT_ID="your_client_id"
export OPENSKY_CLIENT_SECRET="your_client_secret"

Or add to Xcode scheme:

  1. Open project in Xcode
  2. Product �� Scheme → Edit Scheme
  3. Select Run → Arguments tab
  4. Add Environment Variables:
    • OPENSKY_CLIENT_ID = your_client_id
    • OPENSKY_CLIENT_SECRET = your_client_secret

2. Build

# Regenerate Xcode project
xcodegen generate

# macOS
xcodebuild -project UpThere.xcodeproj -target UpThereMac -configuration Debug build

# iOS (requires simulator)
xcodebuild -project UpThere.xcodeproj -target UpThere -sdk iphonesimulator -configuration Debug build

3. Run

# macOS
open build/Debug/UpThere.app

Requirements

System, platform, and runtime requirements are documented in Requirements/ as Markdown files with structured YAML frontmatter. Each requirement includes Given/When/Then test scenarios for future automated test generation.

Runtime Requirements

  • macOS 14.0+ or iOS 17.0+
  • Location services enabled
  • OpenSky Network account (free, optional)

Data Source

Uses the OpenSky Network API for real-time flight data.

Debugging

The app uses structured logging via Apple's os.Logger framework. All logs use the subsystem com.moritzwade.upthere with per-component categories: FlightService, LocationService, and ViewModel.

Viewing Logs

Console.app: Filter by subsystem com.moritzwade.upthere.

Command line:

# Stream all logs
log stream --predicate 'subsystem == "com.moritzwade.upthere"' --level debug

# Only errors
log stream --predicate 'subsystem == "com.moritzwade.upthere" && level == 16' --level error

# Only FlightService logs
log stream --predicate 'subsystem == "com.moritzwade.upthere" && category == "FlightService"' --level debug

Log Levels

Level Use Case
debug Verbose: request URLs, location coords, refresh counts
info Key events: tracking start/stop, flights fetched, auth granted
warning Recoverable issues: token refresh, rate limits, missing location
error Failures: network errors, auth failures, location failures

Adding New Log Statements

Use the centralized AppLogger enum:

AppLogger.flightService.debug("Building request URL")
AppLogger.viewModel.info("Tracking started")
AppLogger.locationService.error("Location failed", error: someError)

About

Real-time airplane flight tracker for macOS and iOS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages