What problem does it solve?
This Skill provides a cohesive approach for architecting app entry points, centralized state management, and reliable root-view switching to reduce flicker and scattered logic across iOS apps.
Core Features & Use Cases
- Central AppStateController enforces an explicit app state machine (loading, unauthenticated, onboarding, authenticated, error) as the single source of truth.
- A thin @main that delegates navigation decisions to a RootView switch, ensuring smooth transitions between LaunchView, AuthenticationFlow, OnboardingFlow, MainTabView, and ErrorRecoveryView.
- Scene lifecycle handling and coordinated responses to scenePhase changes (active, inactive, background) to validate sessions, refresh data, and preserve/restores state across launches.
- Optional coordination strategies (coordinators or environment-based dependencies) to orchestrate multi-window and cross-feature navigation.
- Clear module boundaries and API guidance to inform future modularization decisions.
Quick Start
Set up AppStateController as the app shell in @main, route RootView to app states, and handle scenePhase transitions to ensure a seamless launch.