Swift Composable Notifications #
ComposableNotifications is a transport-independent TCA26 package for app notification wiring.
The package also exposes a platform-neutral AppDelegateFeature. Skip-compatible Darwin and
Android entry points send actions into this outer application feature through the same root store
rendered by the UI. The feature forwards those actions to app-owned triggers. The host decides how
to fan out a notification to browse, schedule, or other application features.
The first slice has three directions:
- A platform delegate sends typed device destinations into the root application store.
- The wrapper forwards each destination to the authenticated server client without storing token material in feature state.
- Mounted descendants publish opaque source subscriptions upward as a feature preference.
- The wrapper delivers versioned
sourceAvailablesignals downward through a content trigger.
The package deliberately does not know about OME events, APNs, Firebase, XRPC, authentication, or
data reload policy. The host installs an authenticated NotificationsClient implementation and the
application decides how to interpret a source identifier and version.
NotificationsFeature is the parent of the app root and is intended to sit inside the host's
authentication feature. AppDelegateFeature can wrap that authenticated content at the host's
shared application boundary:
AppDelegateFeature(
eventTrigger: \ApplicationRoot.State.appDelegateEvent,
notificationDestinationTrigger: \ApplicationRoot.State.notificationDestination,
notificationEventTrigger: \ApplicationRoot.State.notificationEvent
) {
ApplicationRoot()
}
ApplicationRoot is host-owned composition that can place authentication, NotificationsFeature,
and the OME notification-handler coordinator below the delegate boundary.