r/iOSProgramming • u/Thesinisterguy • 56m ago
Discussion Lessons learned from a major legacy code refactoring for a HealthTech app
Hi, I was reading about this case study on the legacy IoT app optimization project that Beetroot consultants did for an established healthtech leader. The legacy codebase was riddled with critical bugs and the application suffered from serious performance bottlenecks and a confusing user experience that was tanking user engagement.
They created a dedicated team to address this under a flexible team extension model: 2 iOS developers, 2 Android developers, 1 QA automation engineer and 1 manual QA engineer with UI/UX design support. They ran into the classic dilemma: instead of choosing the expensive, risky rewrite from scratch, they took the hard way. They decided to refactor the legacy codebase to get rid of technical debt and squash the core bugs.
Crucially, they embedded deep product analytics tools like Firebase, Amplitude, and Smartlook directly into the new architecture. This let them track exactly how the app interacted with IoT medical hardware. For medical applications this deliberate refactoring approach is super interesting. What are your primary indicators for deciding whether to refactor the existing code or drop everything and start a full rewrite?

