steipete/Aspects
Delightful, simple library for aspect oriented programming in Objective-C and Swift. observed · 2026-08-28
Health v2 · maintenance only
10/100
- Activity 54
- Release rhythm 8
- Longevity 100
Flags: archived
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 4505
- days_rel: n/a
- days_push: 281
- n_releases_24m: 0
Adoption not part of the score
8422 stars · 1266 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
Aspects is a small Objective-C/Swift library for aspect-oriented programming that hooks into existing methods per class or per instance using message forwarding and dynamic subclasses. It is essentially method swizzling made easy, with before/instead/after insertion points and thread-safe token-based deregistration.
Use cases
- add logging or analytics to existing iOS methods without subclassing
- mock parts of a method in tests
- hook into view controller lifecycle methods
- patch third-party framework behavior at runtime
- quickly prototype behavior changes via method hooks
When to choose
- you need lightweight AOP or method swizzling in Objective-C/Swift
- you want per-instance or per-class method hooks with before/instead/after options
- you need partial test mocks in an iOS codebase
- you're hacking on a prototype and need quick runtime hooks
When to avoid
- the author explicitly does not recommend it for production code
- you need to hook methods called at high frequency (message forwarding overhead)
- you need to hook static methods
- your codebase relies heavily on message forwarding, which conflicts with _objc_msgForward
Facets
library · maturity maintenance
middleware developer-tools testing mocking developer-tools mobile-development apple-ecosystem cpp aspect-oriented-programming method-swizzling objective-c aop hooks runtime ios macos swift
1 source
- readme: https://github.com/steipete/Aspects · fetched 2026-08-28 · a2a91f2d1995
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| steipete/Aspects | main | 10 |
For agents
markdown · JSON · MCP: product_card(name="steipete/Aspects")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem