Adding features
1) Create a feature folder
Section titled “1) Create a feature folder”ios/SwiftLaunch/Features/MyFeature/ MyFeatureState.swift Views/ Models/ Services/2) Add an @Observable state object
Section titled “2) Add an @Observable state object”Keep state + side effects in the state object (not in the view):
@Observablefinal class MyFeatureState { var isLoading = false var error: MyFeatureError?
func load() async { /* ... */ }}3) Build a view that owns the state
Section titled “3) Build a view that owns the state”struct MyFeatureView: View { @State private var state = MyFeatureState() var body: some View { /* ... */ }}4) Wire navigation
Section titled “4) Wire navigation”Wire your feature into the existing app shell:
ios/SwiftLaunch/App/LaunchSwiftApp.swiftios/SwiftLaunch/App/AppRouter.swiftios/SwiftLaunch/App/AppState.swiftios/SwiftLaunch/Models/Feature.swift(Home feature cards)
5) Add tests
Section titled “5) Add tests”- unit tests for state/service
- integration coverage in
ios/SwiftLaunchTests/andios/SwiftLaunchUITests/