Swift/SwiftUI strictness, clean code, and security rules. Use when writing, reviewing, or refactoring Swift code in iOS/macOS projects. Covers force unwrap prevention, @Observable vs ObservableObject patterns, access control, concurrency safety (@MainActor, actors, Sendable), error handling with typed enums, memory leak prevention, guard-first style, and naming conventions. Derived from production
Receba novas skills de Desenvolvimento toda segunda
1 email curto, só com as skills novas de Desenvolvimento. 4 minutos de leitura, sem spam, cancela com 1 clique.
Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.
Ler descrição completaRecolher descrição
Swift Strict Standard
Rules extracted from 3 production SwiftUI iOS apps.
CRITICAL: Unwrapping Rules
SW-01: Never force unwrap in production code
// BAD
let name = user!.name
let url = URL(string: urlString)!
let day = calendar.date(byAdding: .day, value: -1, to: date)!
// GOOD
guard let name = user?.name else { return }
guard let url = URL(string: urlString) else {
throw AppError.invalidURL(urlString)
}
guard let day = calendar.date(byAdding: .day, value: -1, to: date
[Description truncada. Veja o README completo no GitHub.]