A personal "fog of war" map for your iPhone. As you walk or drive with the app open (foreground or background), it reveals the city as a honeycomb of explored hexagons. Single user, no account, no network — all data lives in a local SQLite file on your phone.
| Piece | File | What it does |
|---|---|---|
| App entry | Sources/MyExploreApp.swift |
SwiftUI app |
| Map UI | Sources/ContentView.swift, Sources/MapView.swift |
MapKit map + explored hexagons + stats bar |
| Tracking | Sources/LocationManager.swift |
CoreLocation, foreground + background updates |
| Grid math | Sources/HexGrid.swift |
lat/lng → hexagon (~100 m), and back to drawable corners |
| Storage | Sources/Database.swift |
SQLite: visited_hex + raw track_point breadcrumbs |
Each GPS fix is snapped to a hexagon (pointy-top grid over a Web Mercator projection, ~100 m across). New hexagons are inserted; revisits bump a counter. The map draws all explored hexagons as one translucent overlay.
- Open the project:
(If you ever change
open MyExplore.xcodeprojproject.yml, regenerate withxcodegen generate.) - Select the MyExplore target → Signing & Capabilities → pick your
Apple Developer Team. The bundle id is
net.cloudaid.myexplore(change it if needed). - Plug in your iPhone, select it as the run destination, press ▶ Run.
- On the phone, allow location — choose Always so it keeps tracking in the background. The blue status bar means it's recording.
With your paid developer account the signature lasts a year, so install once.
- Hexagon size:
HexGrid.size(currently75Mercator meters ≈ 100 m across). Smaller = finer detail, more tiles. - GPS sensitivity:
LocationManagerdistanceFilter(meters between fixes) anddesiredAccuracy.
A plain SQLite file at Application Support/explore.sqlite inside the app's
container. visited_hex is the map; track_point keeps raw breadcrumbs so you
could re-grid later at a different size.