finds.dev

krzysztofzablocki/Inject

Hot Reloading for Swift applications!

View on GitHub

★ 3,488SwiftMITupdated Apr 2026

// the take

A thin SPM/CocoaPods wrapper around InjectionIII that gives SwiftUI, UIKit and AppKit apps hot code reloading with minimal integration code. It's for iOS/macOS developers who want to skip rebuild-and-relaunch cycles during UI iteration without adopting a whole new toolchain.

The injection calls compile to no-ops in release builds (stripped by LLVM), so you can leave them in production code permanently instead of wrapping everything in #if DEBUG. SwiftUI integration is genuinely two lines with no architectural changes. The ViewHost/ViewControllerHost pattern for UIKit/AppKit lets you hot-reload a child view controller by wrapping it at the parent call site, without touching the class you're actually iterating on.

It's a hard dependency on InjectionIII, a separate macOS app downloaded outside of SPM/Cocoapods that has to be version-matched to your Xcode install — Xcode upgrades are a known way to break this kind of tooling, and this library can't fix bugs in that underlying engine since all the real reload logic lives there. Initial setup requires per-target linker flags (-Xlinker -interposable) and a user-defined build setting (EMIT_FRONTEND_COMMAND_LINES), which are easy to get wrong and give unhelpful failure modes. The optional 'automatic injection' script is a sed-based tool that rewrites your Swift source files in place using brace-counting heuristics — the README itself warns to use it cautiously, and it's the kind of thing that silently mangles a file with unusual formatting.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

search the same ground:

// at a glance

Stars
3,488
Forks
147
Language
Swift
License
MIT
Last commit
29 Apr 2026

// nearby

If Inject isn't quite it.

All repos →