Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SafeDrive

A free, open-source iOS navigation app with CarPlay support and speed camera alerts.

Quick Start (No Mac Required)

  1. Fork this repo on GitHub
  2. Go to Actions tab → "Build iOS App" → Run workflow
  3. Download SafeDrive-unsigned.ipa from artifacts
  4. Install using one of these methods:

Install with Sideloadly (Windows/Mac)

  1. Download Sideloadly
  2. Connect iPhone via USB
  3. Drag IPA onto Sideloadly, enter Apple ID
  4. App installs (expires in 7 days, re-sideload to renew)

Install with AltStore (Windows/Mac)

  1. Install AltStore on your PC and iPhone
  2. Open AltStore on iPhone → My Apps → + → Select IPA
  3. Same 7-day expiry, AltStore auto-refreshes if PC is on

Install with TrollStore (Permanent, iOS 14.0-16.6.1)

  1. Install TrollStore if eligible
  2. Open IPA with TrollStore
  3. App installs permanently, no expiry

Note: CarPlay requires Apple's entitlement. Without a paid developer account ($99/yr), CarPlay won't work - but the phone app with navigation and speed camera alerts works fine.

Built using:

  • MapLibre - Open-source maps (no API keys required)
  • OpenStreetMap - Free map data
  • OSRM - Open-source routing engine
  • Nominatim - OpenStreetMap geocoding

Features

  • CarPlay Support - Full navigation on your car's display
  • Speed Camera Alerts - Warnings for fixed and mobile cameras
  • Turn-by-turn Navigation - Voice guidance and maneuver instructions
  • Offline-ready - Can be configured for self-hosted services
  • Privacy-focused - No telemetry, no tracking

Requirements

  • macOS with Xcode 15+
  • iOS 15+ device or simulator
  • Apple Developer account (for CarPlay entitlements)

Setup Instructions

1. Open in Xcode

cd SafeDrive
open Package.swift

Or create a new Xcode project and add this package.

2. Configure Signing

  1. Open project settings
  2. Select your team
  3. Update bundle identifier to your own (e.g., com.yourname.safedrive)

3. CarPlay Entitlements

To use CarPlay, you need Apple's CarPlay entitlement:

  1. Log into Apple Developer Portal
  2. Go to Certificates, Identifiers & Profiles
  3. Request CarPlay Maps entitlement for your app ID
  4. Wait for Apple approval (can take a few days)
  5. Regenerate your provisioning profiles

For testing without CarPlay: The app works fully on iPhone without CarPlay entitlement.

4. Build & Run

# Build
xcodebuild -scheme SafeDrive -destination 'platform=iOS Simulator,name=iPhone 15'

# Or just use Xcode

Architecture

SafeDrive/
├── Sources/
│   ├── App/
│   │   ├── SafeDriveApp.swift      # App entry point
│   │   ├── PhoneSceneDelegate.swift # Phone UI scene
│   │   └── MainViewController.swift # Main phone interface
│   ├── CarPlay/
│   │   ├── CarPlaySceneDelegate.swift    # CarPlay scene delegate
│   │   └── CarPlayMapViewController.swift # CarPlay map view
│   ├── Navigation/
│   │   ├── NavigationManager.swift  # Core navigation logic
│   │   └── Models.swift             # Data models
│   └── SpeedCameras/
│       └── SpeedCameraManager.swift # Speed camera data
└── Resources/
    ├── Info.plist
    └── SafeDrive.entitlements

Data Sources

Maps

  • Default: MapLibre Demo Tiles
  • Production: Use your own tiles or services like MapTiler, Stadia Maps

Routing

Speed Cameras

  • OpenStreetMap via Overpass API
  • Community contributions
  • You can add your own database

Self-Hosting (Optional)

For production use, consider self-hosting:

OSRM (Routing)

docker run -t -v "${PWD}:/data" ghcr.io/project-osrm/osrm-backend osrm-extract -p /opt/car.lua /data/region.osm.pbf
docker run -t -v "${PWD}:/data" ghcr.io/project-osrm/osrm-backend osrm-partition /data/region.osrm
docker run -t -v "${PWD}:/data" ghcr.io/project-osrm/osrm-backend osrm-customize /data/region.osrm
docker run -t -i -p 5000:5000 -v "${PWD}:/data" ghcr.io/project-osrm/osrm-backend osrm-routed --algorithm mld /data/region.osrm

Map Tiles

Use OpenMapTiles or tileserver-gl

Nominatim (Geocoding)

docker run -it \
  -e PBF_URL=https://download.geofabrik.de/europe/netherlands-latest.osm.pbf \
  -p 8080:8080 \
  mediagis/nominatim:4.2

Customization

Change Map Style

Edit setupMapView() in both view controllers:

let styleURL = URL(string: "https://your-style-url/style.json")!

Add Speed Camera Database

Create speed_cameras.json in Resources:

[
  {
    "id": "1",
    "latitude": 52.3676,
    "longitude": 4.9041,
    "speedLimit": 50,
    "type": "fixed",
    "direction": 180
  }
]

Change Routing Server

Edit NavigationManager.swift:

private let routingBaseURL = "https://your-osrm-server.com"

License

MIT License - Use freely, modify as needed.

Contributing

Contributions welcome! Areas that need work:

  • Voice guidance (text-to-speech)
  • Offline map support
  • More speed camera sources
  • Traffic data integration
  • Alternative routing algorithms

Disclaimer

Speed camera data may not be complete or accurate. Always follow local traffic laws and posted speed limits. This app is for assistance only - the driver is responsible for safe driving.

About

Free iOS navigation app with CarPlay support and speed camera alerts

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages