A free, open-source iOS navigation app with CarPlay support and speed camera alerts.
- Fork this repo on GitHub
- Go to Actions tab → "Build iOS App" → Run workflow
- Download
SafeDrive-unsigned.ipafrom artifacts - Install using one of these methods:
- Download Sideloadly
- Connect iPhone via USB
- Drag IPA onto Sideloadly, enter Apple ID
- App installs (expires in 7 days, re-sideload to renew)
- Install AltStore on your PC and iPhone
- Open AltStore on iPhone → My Apps → + → Select IPA
- Same 7-day expiry, AltStore auto-refreshes if PC is on
- Install TrollStore if eligible
- Open IPA with TrollStore
- 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
- 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
- macOS with Xcode 15+
- iOS 15+ device or simulator
- Apple Developer account (for CarPlay entitlements)
cd SafeDrive
open Package.swiftOr create a new Xcode project and add this package.
- Open project settings
- Select your team
- Update bundle identifier to your own (e.g.,
com.yourname.safedrive)
To use CarPlay, you need Apple's CarPlay entitlement:
- Log into Apple Developer Portal
- Go to Certificates, Identifiers & Profiles
- Request CarPlay Maps entitlement for your app ID
- Wait for Apple approval (can take a few days)
- Regenerate your provisioning profiles
For testing without CarPlay: The app works fully on iPhone without CarPlay entitlement.
# Build
xcodebuild -scheme SafeDrive -destination 'platform=iOS Simulator,name=iPhone 15'
# Or just use XcodeSafeDrive/
├── 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
- Default: MapLibre Demo Tiles
- Production: Use your own tiles or services like MapTiler, Stadia Maps
- Default: OSRM Demo Server
- Production: Self-host OSRM or use alternatives
- OpenStreetMap via Overpass API
- Community contributions
- You can add your own database
For production use, consider self-hosting:
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.osrmUse OpenMapTiles or tileserver-gl
docker run -it \
-e PBF_URL=https://download.geofabrik.de/europe/netherlands-latest.osm.pbf \
-p 8080:8080 \
mediagis/nominatim:4.2Edit setupMapView() in both view controllers:
let styleURL = URL(string: "https://your-style-url/style.json")!Create speed_cameras.json in Resources:
[
{
"id": "1",
"latitude": 52.3676,
"longitude": 4.9041,
"speedLimit": 50,
"type": "fixed",
"direction": 180
}
]Edit NavigationManager.swift:
private let routingBaseURL = "https://your-osrm-server.com"MIT License - Use freely, modify as needed.
Contributions welcome! Areas that need work:
- Voice guidance (text-to-speech)
- Offline map support
- More speed camera sources
- Traffic data integration
- Alternative routing algorithms
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.