I need a rock-solid background service for my iOS app that keeps recording a user’s location and calculating travelled kilometres even when the interface is closed or the app is only in the tray. The codebase mixes Swift and a small layer of Objective-C, so whatever you build has to slot neatly into both worlds without rewriting everything. The core requirement is persistence: the service must survive app termination, screen locks, and the usual iOS quirks around background execution. I also want graceful handling of foreground transitions so distance figures remain accurate regardless of the OS version a user is on. Right now I’m hitting “Stream has already been listened to” errors when I pipe data back to the UI. I’m looking for a clean, reusable pattern—think sendDataToTask style—that can move logs and live metrics from the service to the main app thread without race conditions. Battery life is critical. You’ll need to respect Apple’s power-saving rules, work around vendor-specific optimisation settings some devices enable by default, and prove with Instruments or Xcode’s Energy Log that the tracker has minimal impact during a full day’s use. Deliverable: a self-contained module (Swift + Obj-C compatible) that starts, stops, and reports location continuously, exposes a simple delegate or Combine/NotificationCenter stream, and includes clear integration notes so my team can drop it straight into production.