BGeo SDK
BGeo is a background-geolocation SDK for native iOS. It keeps tracking across app backgrounding, force-quit and reboot, uploads locations from native code, and adapts GPS use to motion to save battery.
- Swift-first —
async/awaitandAsyncStream, not delegate callbacks. Every method mirrors the name it has in BGeo’s React Native, Flutter and Android SDKs, so moving between them is a matter of syntax, not concepts. - Survives a force-quit. A user swiping the app out of the switcher is the hardest case on iOS, and the session engine relaunches the process in about a second — device-verified across three consecutive force-quit deaths.
- Native offline upload — a durable SQLite queue drains to your server with batching, backoff and optional JWT refresh; it survives process death.
- Motion-based tracking — Kalman smoothing, Core Motion activity recognition, a wake region that rolls along the route, and an elastic distance filter.
- Closed engine, open facade — the engine ships as a prebuilt
BGeoCore.xcframeworkbehind a Swift facade you can read end to end on GitHub. Requires a license key in release builds.
Install
.package(url: "https://github.com/dc-bgeo/ios-background-geolocation", from: "0.1.0")Or in Xcode: File → Add Package Dependencies…. See
Installation for the Info.plist
keys and the background mode, without which iOS grants nothing.
Track in ten lines
import BackgroundGeolocation
Task { try await BackgroundGeolocation.ready(Config(distanceFilter: 10, stopTimeout: 5)) _ = try await BackgroundGeolocation.requestPermission() try await BackgroundGeolocation.start()}
Task { for await location in BackgroundGeolocation.locations { print(location.coords.latitude, location.coords.longitude) }}Quickstart walks the same flow with the parts that matter explained.
Where to go next
- Installation — SwiftPM,
Info.plist, background modes - Permissions — When In Use, Always, and the upgrade prompt
- Quickstart — first fix on screen
- License keys — what release builds need