# steipete/InterposeKit

A modern library to swizzle elegantly in Swift.

Repository: https://github.com/steipete/InterposeKit
Canonical: https://ross.abutalabs.com/products/interposekit
Homepage: https://interposekit.com/
Language: Swift
License: MIT
License Family: permissive
Topics: swift, swizzling, interpose, hook, aspects
Archived: true
Last push: 2026-06-11T12:25:27+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 87, release rhythm 35, longevity 100
- inputs: {"age_days": 2305, "days_push": 83, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, archived
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1028, forks 53 (observed 2026-08-28T04:03:17.274040+00:00)

## What it is
InterposeKit is a modern Swift library for method swizzling that hooks @objc dynamic Swift functions and Objective-C instance methods on classes or individual objects. It replaces implementations directly via class_replaceMethod instead of method_exchangeImplementations, avoiding common swizzling pitfalls.

## Use cases
- swizzle an Objective-C method in Swift
- hook a method to run code before or after the original implementation
- patch a framework method at runtime to work around a bug
- interpose on a single object instance instead of the whole class
- replace method_exchangeImplementations-based swizzling with a safer approach

## When to choose
- you need elegant, type-safe method swizzling in pure Swift
- you want to hook @objc dynamic methods or Objective-C instance methods
- you need per-instance hooks or before/instead/after semantics like the Aspects library

## When to avoid
- you need dynamic subclassing, which InterposeKit does not implement
- your methods are not exposed to the Objective-C runtime
- you want an actively maintained library - the repository was archived in June 2026 and is read-only

## Facets
- artifact type: library
- maturity: maintenance
- function: developer-tools
- domain: developer-tools, apple-ecosystem
- platform: -
- tags: method-swizzling, objc-runtime, hooking, aspects, swift-package, macos, ios, swift

## Member repositories
- steipete/InterposeKit (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:17.274040+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:07:49.414478+00:00, confidence not recorded.
  - readme: https://github.com/steipete/InterposeKit (fetched 2026-08-28T04:03:17.274040+00:00, sha 8011c9955835)
  - homepage: https://interposekit.com/ (fetched 2026-08-29T13:07:47.399901+00:00, sha 4f4b36eedcb4)
- Data as of 2026-08-30T08:39:29.467469+00:00.
