tracelet_ios 1.3.6
tracelet_ios: ^1.3.6 copied to clipboard
iOS implementation of the Tracelet background geolocation plugin.
1.3.6 #
- FIX:
getLocations()now honorsSQLQuery.startandSQLQuery.endtimestamp filtering. - FIX:
getCount()now accepts optionalSQLQueryfor time-bounded counting. - CHORE: Update cross-package dependency constraints to
^1.3.6.
1.3.5 #
- FIX: Fix
Unable to find module dependency: 'TraceletCore'Swift compiler error by consolidating SPM targets into a single module and removing invalid cross-module imports. - FIX: Add missing
AVFoundation,AudioToolbox, andNetworkframework linker settings inPackage.swift.
1.3.4 #
- CHORE: Update
tracelet_platform_interfacedependency constraint to^1.3.3.
1.3.3 #
- FIX: Bundle TraceletCore Swift source files directly inside the plugin package instead of depending on an unpublished local CocoaPod. Fixes unresolved
import TraceletCorewhen installed from pub.dev.
1.3.2 #
- PERF: Replace
Foundation UUID()with C-leveluuid_generate_random/uuid_unparse_lowerinLocationEngineandTraceletDatabase(I-M6).
1.3.1 #
- FIX:
getPersistenceExtras()now reads distinctpersistenceExtrasconfig key with backward-compatible fallback. - PERF:
markSynced()uses chunked SQL statements (500 UUIDs/chunk) instead of unbounded placeholder lists.
1.3.0 #
- FIX:
getState()always returnedenabled: falseon iOS —StateManager.toMap()flat-merged the config dictionary into the state dictionary, causing config keys (enabledfrom audit section,isMovingfrom motion section) to overwrite runtime state values. Config is now correctly nested under a"config"key, matching the Android implementation and the DartState.fromMap()contract (#26).
1.2.1 #
iOS↔Android Parity Fixes #
- FEAT: Add
ConfigManager.hasConfig()— returnstrueif a config has been persisted at least once (checks UserDefaults for stored config data). Matches existing AndroidConfigManager.hasConfig(). - FEAT: Add
StateManager.lastPeriodicLatitude/lastPeriodicLongitude— persisted coordinates for odometer computation across periodic tracking restarts. ReturnsNaNwhen no fix has been recorded; settingNaNremoves the persisted value. Matches AndroidStateManager.lastPeriodicLatitude/Longitude. - FEAT: Add
StateManager.addOdometer(distance:)— incremental odometer accumulation method. Matches AndroidStateManager.addOdometer(distance). - FEAT: Add
LocationEngine.stopAllWatchers()— clears all active watch-position subscriptions. Called automatically fromdestroy(). Matches AndroidLocationEngine.stopAllWatchers(). - FEAT: Add
TraceletEventSending.hasListener(eventName:)protocol method andEventDispatcher.hasListener(eventName:)implementation — checks if a Dart listener is attached for a given event channel. Accepts both full path (com.tracelet/events/location) and short name (location). Matches AndroidEventSender.hasListener(). - REFACTOR: All TraceletCore members made
publicfor cross-module access withuse_frameworks!CocoaPods integration.
1.2.0 #
- CHORE: Version bump for federation consistency with
tracelet_platform_interface1.2.0 (newNotificationPriorityandHashAlgorithmenums).
1.1.0 #
New Features #
- FEAT: Add native
DeltaEncoder(Swift) for delta-compressed HTTP sync payloads — mirrors the Dart implementation exactly for platform consistency. Encodes only field deltas between consecutive locations using shortened keys (la,lo,t,s,h,a,al,b), achieving 60–80% bandwidth reduction. Uses Foundation'sISO8601DateFormatterwith fractional seconds fallback for robust timestamp handling. - FEAT:
ConfigManagernow reads and applies the following new configuration fields from Dart:batteryBudgetPerHour(adaptive battery budget target),enableSparseUpdates,sparseDistanceThreshold,sparseMaxIdleSeconds(app-level deduplication),enableDeadReckoning,deadReckoningActivationDelay,deadReckoningMaxDuration(inertial navigation when GPS lost),enableDeltaCompression,deltaCoordinatePrecision(HTTP delta encoding), anddisableAutoSyncOnCellular(WiFi-only sync). - FEAT:
HttpSyncManagernow supportsdisableAutoSyncOnCellular— skips auto-sync when device is on cellular network, syncing only on WiFi. Also conditionally appliesDeltaEncoder.encode()to multi-location batches before HTTP upload whenenableDeltaCompressionis enabled, reducing upload size by 60–80%.
1.0.2 #
- FIX:
handleReset()unconditionally removed geofence registrations from CLLocationManager even whenstopOnTerminate: falsewas configured withtrackingMode=1(geofence mode). Geofences now survive the reset call so CLLocationManager continues monitoring regions after app termination (#23).
1.0.1 #
- FIX: HTTP auto-sync never triggered from automatic location tracking —
onLocationInserted()was only called from the manualinsertLocationhandler, not fromLocationEngine.persistLocationIfAllowed()(#21). - FIX:
ConfigManager.getHttpMethod()castIntasString, silently ignoringHttpMethod.put— now correctly maps0→ POST,1→ PUT. - FIX:
ConfigManager.getHttpHeaders()strict[String: String]cast could drop headers when platform channel delivers[String: Any]— now coerces values to strings. - FIX:
maxBatchSizedefault corrected from 100 to 250 to match Dart and Android defaults.
1.0.0 #
🎉 Stable Release #
- FEAT: First stable release of
tracelet_ios. - REFACTOR: Remove third-party company name references.
- All native iOS APIs are finalized and production-ready.
0.12.0 #
Performance Audit — 22 iOS issues resolved #
- PERF: Cache
ISO8601DateFormatteras static instance (I-C1, I-C2). - PERF: Call
UIDevice.isBatteryMonitoringEnabledonce at plugin initialization (I-C3). - PERF: Add serial
stateQueuefor thread-safe sync flag access (I-C4). - PERF: Use
BackgroundTaskHelper.shared.begin()with proper expiration handler (I-C5). - PERF: Reduce accelerometer to 10 Hz and deliver on background queue (I-H1).
- PERF: Set timer tolerance to 10% for iOS energy coalescing (I-H2).
- PERF: Use SQLite transactions for batch geofence inserts (I-H3).
- PERF: Throttle DB pruning to every 100 inserts (I-H4, I-H6).
- PERF: Move JSON serialization outside DB queue lock (I-H5).
- PERF: Default
pausesLocationUpdatesAutomaticallytotrue(I-M1). - PERF: Make
activityTypeconfigurable viagetActivityType()mapping (I-M2). - PERF: Reuse
URLSession—getAllTaskscancel instead ofinvalidateAndCancel(I-M3). - PERF: Defer
BGAppRefreshTask.setTaskCompleteduntil async location fix returns (I-M4). - PERF: Find monitored region by identifier instead of creating dummy
CLCircularRegion(I-M5). - PERF: Add in-memory privacy zone cache with CRUD invalidation (I-M7).
- PERF: Add in-memory geofence cache with CRUD invalidation (I-M8).
- PERF: Lazy-init
CMMotionActivityManagerandCMPedometerfor accelerometer-only mode (I-L1). - PERF: Remove duplicate
haversine()fromGeofenceManager, call module-level function (I-L3). - PERF: Remove dead
@available(iOS 14)self-assign no-op (I-L4). - REFACTOR: Remove trivial
isMoreRestrictive()wrapper, inlineisActionMoreRestrictive()call (I-L5). - CHORE: Add CoreLocation import to
ConfigManager.swiftforCLActivityType.
0.11.5 #
- FIX: Persist polygon geofence
verticesto SQLite — addvertices TEXTcolumn withPRAGMA table_infomigration for existing installs, and JSON serialization/deserialization ininsertGeofence()/geofenceRowToMap(). - FIX: Use
NSNumberbridging forJSONSerializationvertex deserialization (fixes silent cast failure with[[Double]]). - FIX: Handle heterogeneous vertex arrays — skip non-array entries instead of failing the entire cast.
- TEST: Add XCTest tests for geofence vertices CRUD (11 tests covering round-trip, validation, edge cases).
- TEST: Add DB migration integration tests — column addition, data preservation, idempotency, multi-geofence migration, fresh install.
0.11.4 #
- FIX: Revert over-aggressive
allowsBackgroundLocationUpdatesand significant-location guards — When In Use permission now works correctly for foreground and background tracking. iOS enforces permission at the OS level; only the killed-state entry point (autoResumeTracking) requires Always authorization.
0.11.3 #
- FIX: Add
.authorizedAlwaysguard toautoResumeTracking()— prevents "When In Use" permission from triggering tracking after app is relaunched from killed state via significant-location-change. - FIX: Guard
allowsBackgroundLocationUpdatesinconfigureLocationManager()andperformPeriodicFix()— only set totruewhen Always authorization is granted.
0.11.2 #
- CHORE: Tighten
tracelet_platform_interfaceconstraint to^0.11.2.
0.11.1 #
- FIX: Set
event: "periodic"in alldidUpdateLocationscode paths for periodic tracking (was empty string). - FEAT: Add
canScheduleExactAlarms(returnstrue) andopenExactAlarmSettings(returnsfalse) method channel stubs. - CHORE: Add NSLog diagnostic logging to
startPeriodic()andperformPeriodicFix(). - CHORE: Bump platform interface to 0.11.1.
0.11.0 #
- FEAT:
AuditTrailManager— SHA-256 hash chain with SQLite persistence and UserDefaults chain state. - FEAT:
PrivacyZoneManager— Haversine distance-based zone evaluation with exclude, degrade, and event-only actions. - FEAT: Privacy zones database table with CRUD operations.
- FEAT: Audit trail database table with hash chain linkage.
- FEAT:
ConfigManagergetters for audit and privacy zone configuration. - CHORE: Bump
tracelet_platform_interfaceto ^0.11.0.
0.10.0 #
- FEAT: Periodic mode — GPS-friendly interval tracking via
startPeriodic(). Timer-based scheduling with background location toggling per fix. - FEAT:
ConfigManagerperiodic config getters for interval, accuracy, foreground service, and exact alarms. - FIX:
ConfigManager.swiftescaped string literals causing Swift compilation failure. - CHORE: Bump
tracelet_platform_interfaceto ^0.10.0.
0.9.1 #
- FIX: Safe optional unwrap of
UIBackgroundTaskIdentifierinHttpSyncManager.syncNextBatch()— fixes Swift compiler error.
0.9.0 #
- FEAT: HTTP sync retry engine — configurable retry with exponential backoff for transient 5xx, 429, and timeout failures. Defers sync on connectivity loss via
NWPathMonitor. Batch continuation loop. - FEAT: Configurable motion sensitivity —
MotionDetectorreadsshakeThreshold,stillThreshold,stillSampleCountfromConfigManagerat runtime (auto-converts m/s² to g-force). - CHORE: Bump
tracelet_platform_interfaceto ^0.9.0.
0.8.3 #
- FEAT: Proximity-based geofence auto-load/unload — only geofences within
geofenceProximityRadiusare registered with CLLocationManager, sorted by distance, capped at 20 (iOS limit). Enables monitoring thousands of geofences. - FEAT:
GeofenceManager.updateProximity()— re-evaluates which geofences to monitor on every location update, dynamically swapping region registrations as the device moves. - FEAT:
geofencesChangeevent fires withon/offarrays when geofences are activated/deactivated from proximity monitoring. - FEAT:
maxMonitoredGeofencesconfig respected — caps simultaneously monitored regions below the platform limit. - CHORE: Bump
tracelet_platform_interfaceto ^0.8.3.
0.8.2 #
- DOCS: Improve README visuals with combined Android & iOS demo image.
0.8.1 #
- FEAT:
BackgroundTaskHelper— central thread-safe utility wrappingUIApplication.beginBackgroundTaskfor safe background execution of native operations. - FEAT: iOS 17+
CLBackgroundActivitySessionsupport viaBackgroundActivitySessionManager— extends background runtime for location-tracking apps. - FEAT: iOS 18+
CLServiceSessionsupport viaServiceSessionManager— maintains authorization state during background execution. - PERF: Wrap
LocationEngine.didUpdateLocationsin background task — protects persist + dispatch chain from iOS suspension. - PERF: Wrap
HttpSyncManager.sync()in background task — protects entire HTTP upload + DB cleanup cycle. - PERF: Wrap
HeadlessRunner.dispatchEvent()engine boot in background task — ensures Dart engine starts fully before iOS reclaims resources. - PERF: Wrap all
TraceletIosPluginlifecycle transitions (handleStop,handleReset,onStopRequested,handleScheduleStop,stopAfterElapsedTimer) in background tasks. - FIX:
preventSuspendManager.start()now called instartGeofences()— was missing, causing audio keep-alive to not activate in geofence-only mode. - FIX:
preventSuspendManager.stop()now called in all stop paths (reset, stopOnStationary, scheduleStop, stopAfterElapsed) — was only called inhandleStop(). - FIX:
setConfig()now togglespreventSuspendManagermid-session whenpreventSuspendchanges. - FIX:
reset()now callscancelStopAfterElapsedTimer()— was leaving stale timer running after reset. - FIX: iOS 17+/18+ session managers wired into all lifecycle paths (start, stop, startGeofences, reset, scheduleStart/Stop, stopOnStationary, stopAfterElapsed).
0.8.0 #
- FEAT: OEM compatibility stubs —
getSettingsHealthreturnsisAggressiveOem: false(iOS has no OEM power management issues),openOemSettingsreturnsfalse. - DOCS: Update README with OEM compatibility note and documentation link.
- CHORE: Bump
tracelet_platform_interfaceto ^0.8.0.
0.7.1 #
- DOCS: Add mock location detection feature to README with platform-specific detection details.
- CHORE: Bump
tracelet_platform_interfaceto ^0.7.1.
0.7.0 #
- FEAT: Mock location detection —
isLocationMock()usesCLLocationSourceInformation(iOS 15+) to detect simulated locations. - FEAT: Heuristic mock detection (level 2) — timestamp drift check (> 10s between location timestamp and system time = suspicious).
- FEAT:
buildLocationMap()includesmockflag andmockHeuristicsmetadata map (timestampDriftMs, platformFlagMock). - FEAT: Native-level mock rejection — when
rejectMockLocationsis enabled, drops mocked locations before sending to Dart and firesProviderChangeEvent.mockLocationsDetected. - FEAT:
ConfigManager.getMockDetectionLevel()andgetRejectMockLocations()getters. - CHORE: Bump
tracelet_platform_interfaceto ^0.7.0.
0.6.1 #
- REFACTOR: Remove 6 dead
ConfigManagermethods for filtering migrated to Dart in 0.6.0 (getDisableElasticity,getElasticityMultiplier,getFilterPolicy,getMaxImpliedSpeed,getTrackingAccuracyThreshold,getUseKalmanFilter). - REFACTOR: Remove dead
EventDispatcher.sendTrip()and"trip"channel registration — trip events now from DartTripManager. - CHORE: Bump
tracelet_platform_interfaceto ^0.6.1.
0.6.0 #
- REFACTOR: Remove duplicate location filtering from
LocationEngine.didUpdateLocations()— elasticity, distance filter, accuracy filter, and speed filter now handled by shared DartLocationProcessor. - REFACTOR: Replace
GeofenceManager.evaluateHighAccuracyProximity()with no-op stub — proximity evaluation moved to shared DartGeofenceEvaluator. - CHORE: Bump
tracelet_platform_interfaceto ^0.6.0.
0.5.5 #
- FIX:
onScheduleevent now sends full state map (viastateManager.toMap()) instead of partial["state": "on", "enabled": true]— fixesState.fromMap()crash on schedule events.
0.5.4 #
- FIX: Heartbeat event now wraps location data in
{"location": ...}to matchHeartbeatEvent.fromMap()— fixes heartbeat always returning zero coordinates. - FIX: Heartbeat falls back to last known location (via
buildLocationMap()) whengetCurrentPositionreturns null.
0.5.3 #
- CHORE: Bump
tracelet_platform_interfaceto ^0.5.3.
0.5.2 #
- FEAT: Accelerometer-only motion detection mode — when
disableMotionActivityUpdatesistrue, usesCMMotionManagerraw accelerometer for permission-free stationary↔moving detection (noNSMotionUsageDescriptionrequired). - FEAT:
getMotionAuthorizationStatus()/requestMotionPermission()return3(granted) immediately in accelerometer-only mode — no OS dialog shown. - PERF: Reuse shared
CMMotionManagerinstance for sensor queries instead of creating throwaway instances. - FIX: Auto-fallback to accelerometer-only when
CMMotionActivityManager.isActivityAvailable()returnsfalse.
0.5.1 #
- DOCS: Rewrite README with proper description, setup guide link, and related packages table.
0.5.0 #
- CHORE: Bump
tracelet_platform_interfaceto ^0.5.0. - CHORE: Bump version to 0.5.0.
0.4.0 #
- FEAT:
getMotionPermissionStatus()/requestMotionPermission()— CMMotionActivityManager authorization check. - FIX: Speed always zero in motionchange events — track
lastEffectiveSpeedin LocationEngine. - FIX: "Upgrade to Always" dialog not appearing — fix
handleStartisMoving initialization. - FIX: MotionDetector motion state bugs — proper accelerometer + activity recognition lifecycle.
- CHORE: Bump
tracelet_platform_interfaceto ^0.4.0.
0.3.0 #
- FEAT: One-shot location via
getCurrentPosition()withpersist,samples,maximumAge, andextrasparameters. - FEAT: Multi-sample collection with
distanceFilter = kCLDistanceFilterNoneandDispatchQueuetimeout guard. - FEAT:
getLastKnownLocation()— prefers own cached location, falls back toCLLocationManager.location. - FEAT:
ForegroundServiceConfig.enabledsupport. - FIX: Add
CLAuthorizationStatusguard ingetCurrentPosition()— returns nil if not authorized instead of hanging. - FIX: Single-sample path now sets
desiredAccuracy = kCLLocationAccuracyBestbeforerequestLocation(). - BREAKING: Requires
tracelet_platform_interface: ^0.3.0.
0.2.4 #
- Fix LICENSE file format for proper SPDX detection on pub.dev.
0.2.3 #
- Fix
ConfigManager.setConfig()— flatten nested section sub-maps (geo,app,http, etc.) sent by Dart before processing. Fixes all user config values being silently ignored in favor of defaults.
0.2.2 #
- Fix duplicate keys in
ConfigManager.defaultConfig()dictionary literal causing runtime crash.
0.2.1 #
- Version bump for coordinated release.
0.2.0 #
- Add Swift Package Manager support.
- Fix podspec homepage URL.
- Fix podspec source_files and resource_bundles paths for SPM layout.
- Add SPDX
license: Apache-2.0identifier for pub.dev scoring.
0.1.0 #
- Initial release.
- CLLocationManager-based location tracking.
- CoreMotion activity recognition.
- SQLite3 persistence.
- HTTP auto-sync with URLSession.
- CLCircularRegion geofencing.
- Headless FlutterEngine execution.
- BGTaskScheduler integration.
- Significant-change monitoring support.