Skip to main content
The SyncUps example is a complete application that demonstrates advanced TCA patterns including navigation stacks, shared state, persistence, and device capabilities like speech recognition and timers.

Overview

This example shows how to:
  • Build navigation stacks with NavigationStack
  • Share state across features with @Shared
  • Persist data automatically
  • Integrate with device capabilities (microphone, speech)
  • Manage complex feature dependencies
  • Handle real-time updates with effects

Implementation

Key Concepts

The app uses StackState and StackAction for navigation:
Push a screen:
Pop the current screen:

Enum-Based Destinations

Destinations are modeled as an enum:
This provides exhaustive handling and type safety.

Shared State

Data is shared across features using @Shared:
Changes automatically:
  • Update all observers
  • Persist to disk
  • Propagate through navigation

Persistence

Define a shared persistence strategy:
Data automatically loads and saves:

Device Integration

The app integrates with device capabilities:

Speech Recognition

Timers

Audio Recording

Delegate Pattern

Child features communicate with parents using delegates:

Form Management

The app handles editing with draft state:

Architecture

The app is organized into focused features:
Each feature:
  • Has its own state and actions
  • Manages its own dependencies
  • Can be developed and tested independently

Testing

Source Code

View the complete example in the TCA repository:

Next Steps