Freeletics Jun 22, 2020

iOS Data Tracking with CoreData

Article Summary

Emre Havan from Freeletics ditched third-party analytics SDKs and built a custom tracking system using CoreData. The result? Full control over batching, performance, and data flow without external dependencies.

Most iOS apps rely on Firebase or Mixpanel for event tracking, but Freeletics took a different path. This deep dive walks through their production implementation of a custom tracking infrastructure using CoreData, complete with storage, batching, and network layers that handle offline scenarios and thread safety.

Key Takeaways

Critical Insight

Building custom analytics with CoreData gives you complete control over batching logic, offline persistence, and performance without third-party SDK overhead.

The article reveals a clever DispatchQueue extension that solves a tricky problem with determining the current queue for thread-safe CoreData operations.

Recent from Freeletics

Related Articles