# cesarferreira/SwiftEventBus

A publish/subscribe EventBus optimized for iOS

Repository: https://github.com/cesarferreira/SwiftEventBus
Canonical: https://ross.abutalabs.com/products/swifteventbus
Language: Swift
License: MIT
License Family: permissive
Topics: pub-sub, eventbus, communication, notifications, thread, ios
Last push: 2026-07-30T11:33:31+00:00

## Health v2 (maintenance only)
Score: 96/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 95, release rhythm 95, longevity 100
- inputs: {"age_days": 4226, "days_push": 34, "days_rel": 34, "gap_med": 0, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1121, forks 109 (observed 2026-08-28T04:03:39.947753+00:00)

## What it is
SwiftEventBus is a small, thread-safe publish/subscribe event bus library for Apple platforms, built on NotificationCenter with a cleaner API. It lets iOS, macOS, tvOS, and watchOS components communicate via named events without direct references or delegate wiring.

## Use cases
- decouple ios view controllers with a pub/sub event bus
- post events to the main thread from background work
- replace messy NotificationCenter stringly-typed observers
- broadcast events across app components without delegates
- auto-unregister subscribers when a target is deallocated
- deliver notifications on background threads or custom queues

## When to choose
- you want simple named-event pub/sub across Swift components
- you need thread-aware delivery (main thread, background, custom queues)
- you want lifecycle-friendly observer cleanup with one unregister call
- you need a Foundation-only library usable on all Apple platforms via SPM

## When to avoid
- you need strongly-typed events rather than name-based notifications
- you prefer reactive frameworks like Combine or RxSwift
- your app architecture already uses delegates or Combine pipelines
- you need event delivery guarantees or persistence

## Facets
- artifact type: library
- maturity: active
- function: middleware, concurrency
- domain: mobile-development, developer-tools
- platform: -
- tags: event-bus, pub-sub, notificationcenter, thread-safe, decoupling, swift-package-manager, ios, macos, swift, mobile

## Member repositories
- cesarferreira/SwiftEventBus (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:39.947753+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-30T06:40:59.631059+00:00, confidence not recorded.
  - readme: https://github.com/cesarferreira/SwiftEventBus (fetched 2026-08-28T04:03:39.947753+00:00, sha 6079c748b790)
- Data as of 2026-08-30T08:39:29.467469+00:00.
