Skip to content
Back to skills

Swiftui Apps

ASecurity

Build SwiftUI apps: state ownership, concurrency with actors, previews, accessibility and tests

  • 7 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 30, 2026
ai-agentsswift

Security analysis

A100/100

Scanned November 30, 2026

npx -y skills add ansh44233/forge --skill swiftui-apps --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Swiftui Apps?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Swiftui Apps
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ansh44233-swiftui-apps/badge)](https://www.skillsdirectory.com/skills/ansh44233-swiftui-apps)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
description: Build SwiftUI apps: state ownership, concurrency with actors, previews, accessibility and tests
profile: standard
languages: swift
tags: swift, ios, mobile
---

# SwiftUI apps

Use in Swift packages or Xcode projects.

## State
- One owner per piece of state. Use `@State` for view-local values; for shared models, use `@Observable` classes (iOS 17+) or `ObservableObject` with `@StateObject` at the owner and `@ObservedObject` below.
- Do not create an `ObservableObject` with `@ObservedObject` in the view that owns it; it will be recreated on redraw.
- Keep views small and derive values instead of storing duplicates.

## Concurrency
- UI updates on the main actor: mark view models `@MainActor`.
- Use `.task {}` for work tied to a view's lifetime; it is cancelled automatically.
- Protect shared mutable state with actors. Fix Swift 6 strict-concurrency warnings instead of suppressing them.

## Quality
- Accessibility: labels for icon-only buttons, Dynamic Type support, enough contrast, and VoiceOver order checked.
- Secrets never in the bundle; tokens in the Keychain.
- Previews with sample data for each important state (empty, loading, error).

## Verify
`swift build` and `swift test` for packages, or `xcodebuild test -scheme <Scheme> -destination 'platform=iOS Simulator,name=<device>'`. SwiftLint if configured.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.