Vibeleaderboard
Index / tool
Visit github.com
Category
Developer Tools
Rank
Pricing
Open Source
Type
TOOL
Builder
getsentry
GitHub
196 stars
Latest release
v2.0.1
Date

About

Detects unused code in iOS apps so you can strip dead Swift/Obj-C and ship leaner binaries.

What it does

Reaper observes which app types become active during real user sessions. A separate bundle analyzer inventories detectable types in the app and embedded frameworks. Comparing the observed set with that inventory reveals candidates that never appeared in collected sessions.

Why it's ranked here

Its runtime evidence is more useful than a purely static guess when reflection and dynamic loading complicate reachability. The design is focused and inspectable, but incomplete Swift coverage, narrow binary support, and a required collection pipeline make it a specialist diagnostic rather than a turnkey cleanup system.

What's good

It handles Objective-C classes plus many Swift classes, structs, and enums. Reports contain only newly observed types, reducing repeated output across background and termination events. The bundle analyzer includes embedded frameworks, understands chained fixups, and emits a simple JSON inventory for downstream comparison.

Tradeoffs

Generic Swift types and types with resilient superclasses fall outside key detection paths. The analyzer rejects fat binaries and supports only arm64 input. Runtime collection activates only on an explicit set of operating-system major versions. Reaper supplies observations through a callback, so storage, aggregation, comparison, and deletion decisions remain your responsibility.

How to use it well

Use it for mature iOS apps with representative production sessions and engineers comfortable validating removal candidates. Collect usage across varied journeys, compare those reports with the bundle inventory, then confirm each candidate before deletion. It does not provide a hosted backend, automatic source edits, or proof that an unobserved path is unreachable.

Technical notes+

Package.swift exposes the Reaper library for iOS 13 through Swift Package Manager, while Reaper.podspec supplies an XCFramework through CocoaPods. Sources/Reaper/EMGReaper.mm inspects loaded Mach-O images, Objective-C initialization flags, and Swift metadata, then invokes the registered handler with previously unreported names on backgrounding or termination. Sources/ReaperSwift/NameFinder.swift calls swift_getTypeName for qualified Swift names. Scripts/main.ts scans the app executable and embedded frameworks, while Scripts/findTypes.ts reads __swift5_types and __objc_classlist through Scripts/MachOParser.ts. The root README.md shows a one-argument script command, but Scripts/main.ts requires both an app path and output path; Scripts/README.md documents the two-argument form.

Observed

License
MIT
Implementation languages
Objective-C++, Swift, and TypeScript
Install surfaces
Swift Package Manager, CocoaPods, and downloadable XCFramework
Interface
Embedded iOS library with a callback, plus a Node-based bundle analysis CLI
Platform
iOS, with a declared deployment target of iOS 13
Binary analysis support
64-bit arm64 Mach-O input; fat binaries are rejected
Output format
The bundle analyzer writes a JSON array of detectable type names

Read from README.md, Package.swift, Scripts/main.ts, Scripts/types.ts, Scripts/findTypes.ts, Scripts/MachOParser.ts, Scripts/BufferWrapper.ts, Sources/ReaperSwift/NameFinder.swift, LICENSE, Reaper.podspec, Scripts/README.md, Scripts/package.json, Scripts/tsconfig.json, Sources/Reaper/EMGReaper.mm, Sources/Reaper/ReaperUIKit.h.

What it can do

  • Detect unused Swift code

    iOS app source codeList of unused Swift code segments

  • Detect unused Objective-C code

    iOS app source codeList of unused Objective-C code segments

  • Analyze code dependencies

    iOS app codebaseCode dependency mapping and usage analysis

  • Generate dead code removal recommendations

    Code analysis resultsRecommendations for code cleanup and optimization

  • Calculate potential binary size reduction

    Unused code analysisEstimated app size reduction metrics

Tags

iosdead-codeunused-codeswiftsentry

Tech Stack

Swift

Comments (0)

No comments yet

Editorially curated, with community endorsements as a secondary signal. Corrections welcome.