Sentry open-sourced Reaper, an SDK for detecting dead code in iOS and Android apps through runtime analysis. Unlike static analysis tools, Reaper monitors actual user sessions to identify code that's never executed in production. The iOS version leverages Objective-C and Swift runtime metadata to track type initialization with zero runtime overhead. The Android version instruments bytecode at build time, injecting tracking calls into class initializers. Both implementations allow teams to aggregate usage data across app versions and safely identify unused code for deletion, helping manage codebase complexity and technical debt.

7m read timeFrom blog.sentry.io
Post cover image
Table of contents
How Reaper works: Runtime Analysis How Reaper works: Runtime AnalysisWhy deleting code is important Why deleting code is importantReaper for iOS Reaper for iOSReaper for Android Reaper for AndroidConcluding thoughts Concluding thoughts
2 Comments

Sort: