tracelet_ios 0.8.2
tracelet_ios: ^0.8.2 copied to clipboard
iOS implementation of the Tracelet background geolocation plugin.
tracelet_ios #
iOS implementation of the Tracelet background geolocation plugin.
This package uses Swift and native Apple frameworks (CoreLocation, CoreMotion, BackgroundTasks, SQLite3) to provide production-grade background location tracking.
Native Features #
- Kalman Filter GPS Smoothing — Extended Kalman Filter implementation (
KalmanLocationFilter.swift) smooths raw GPS coordinates using device-reported accuracy as measurement noise. Produces cleaner tracks and eliminates jitter. Learn more → - Trip Detection —
TripManager.swifttracks motion state transitions to detect trip start/stop. Each trip includes distance, duration, waypoints, and start/stop locations. Learn more → - Polygon Geofences — Ray-casting point-in-polygon algorithm in
GeofenceManager.swiftfor arbitrary polygon containment checks alongside circular geofences. Learn more → - Mock Location Detection — Spoof detection using
CLLocationSourceInformation(iOS 15+) and timestamp drift heuristic. Configurable viaMockDetectionLevel. Learn more → - OEM Compatibility — iOS has no OEM-specific power management issues. The Settings Health API returns
isAggressiveOem: falseand an emptyoemSettingsScreenslist. Learn more → - Background Task Protection — All critical native operations (location persist, HTTP sync, headless engine boot, lifecycle transitions) are wrapped in
UIApplication.beginBackgroundTaskto prevent iOS from killing the app mid-operation. - iOS 17+ Background Activity Session —
CLBackgroundActivitySessionextends background runtime for continuous location tracking without user interaction. - iOS 18+ Service Session —
CLServiceSessionmaintains location authorization state during background execution.
Usage #
You should not depend on this package directly. Instead, depend on tracelet which automatically includes this package on iOS builds.
dependencies:
tracelet: ^0.5.0
For iOS-specific setup (Info.plist, capabilities, entitlements), see the iOS Setup Guide.
Related Packages #
| Package | Description |
|---|---|
tracelet |
App-facing Dart API — the only package you depend on |
tracelet_platform_interface |
Abstract platform interface |
tracelet_android |
Android implementation |
tracelet_web |
Web implementation |