swift expert

Swift and SwiftUI expertise for Leavn app.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "swift expert" with this command: npx skills add willsigmon/sigstack/willsigmon-sigstack-swift-expert

Swift Expert

Swift and SwiftUI expertise for Leavn app.

Binding Fixes

Problem: $viewModel.property errors Fix: Add @Bindable wrapper in View:

@Bindable var viewModel: MyViewModel

Actor Isolation (Swift 6)

  • @MainActor for UI-touching code

  • nonisolated for pure functions

  • Task { @MainActor in } for async UI updates

  • Never access @MainActor properties in deinit

@Observable Migration

Old: @Published var x

  • ObservableObject

New: @Observable class

  • plain var x

View: @State var vm = ViewModel() (not @StateObject)

SwiftUI Anti-Patterns

  • Heavy computation in View body → Extract to ViewModel

  • @State for reference types → Use @StateObject/@State with @Observable

  • Missing @MainActor on ViewModels → Add it

  • Force unwrapping in Views → Use nil coalescing

Common Compiler Errors

  • "Cannot convert" → Check Optional unwrapping

  • "Actor-isolated" → Add @MainActor or nonisolated

  • "Missing conformance" → Add protocol or use type erasure

  • "Ambiguous" → Add explicit type annotation

Use when: Swift errors, SwiftUI bugs, migration issues, best practices

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

swiftlint-autofix

No summary provided by upstream source.

Repository SourceNeeds Review
General

bitrise expert

No summary provided by upstream source.

Repository SourceNeeds Review
General

fastlane expert

No summary provided by upstream source.

Repository SourceNeeds Review