r/iOSProgramming • u/shiingin • 6m ago
App Saturday Trig: peak identification in the camera, with line-of-sight checks on an elevation model
Released this week after a long build. Sharing what's inside, since that is what I'd want to read here.
- Swift and SwiftUI, iOS 18.2 and later, no backend of my own.
- Peaks: 1.4 million names from OpenStreetMap and GeoNames in a SQLite file inside the bundle.
- Visibility: for each candidate peak, a line of sight over elevation tiles, with earth curvature. Hidden summits get no label.
- Heading: the compass alone is not good enough, so the app matches the skyline in the camera frames against the skyline computed from terrain and corrects the heading from that.
- 3D panorama: SceneKit, terrain meshes built on a background thread.
- Map: Mapbox.
- Purchases: StoreKit 2, two subscriptions and a lifetime unlock, no third-party SDK.
- No analytics and no account.
Things that cost me the most time: the heading correction on gentle skylines, memory while building terrain to 100 km, and making the 3d panorama be precise and nice.
Happy to answer anything about the terrain work or StoreKit.
https://apps.apple.com/app/trig-mountain-peaks-ar/id6831304391


