Skip to content

Adding features

ios/SwiftLaunch/Features/MyFeature/
MyFeatureState.swift
Views/
Models/
Services/

Keep state + side effects in the state object (not in the view):

@Observable
final class MyFeatureState {
var isLoading = false
var error: MyFeatureError?
func load() async { /* ... */ }
}
struct MyFeatureView: View {
@State private var state = MyFeatureState()
var body: some View { /* ... */ }
}

Wire your feature into the existing app shell:

  • ios/SwiftLaunch/App/LaunchSwiftApp.swift
  • ios/SwiftLaunch/App/AppRouter.swift
  • ios/SwiftLaunch/App/AppState.swift
  • ios/SwiftLaunch/Models/Feature.swift (Home feature cards)
  • unit tests for state/service
  • integration coverage in ios/SwiftLaunchTests/ and ios/SwiftLaunchUITests/