Core Swift language features and modern syntax patterns targeting Swift 5.9+ through Swift 6. Covers language constructs, type system features, Codable, string and collection APIs, and formatting. For concurrency (actors, async/await, Sendable), see the swift-concurrency skill. For SwiftUI views and state management, see swiftui-patterns.
Swift 5.9+ allows if and switch as expressions that return values. Use them to assign, return, or initialize directly.
Swift 6+ allows specifying the error type a function throws.
비동시성, 비SwiftUI 코드에 최신 Swift 언어 패턴과 관용구를 적용합니다. if/switch 표현식(Swift 5.9+), 입력된 throw(Swift 6+), 결과 빌더, 속성 래퍼, 불투명 및 존재 유형(일부 대 임의), 가드 패턴, Never 유형, Regex 빌더(Swift 5.7+), 코딩 가능한 모범 사례(CodingKeys, 사용자 정의 디코딩, 중첩 컨테이너), 최신 컬렉션 API(count(where:), 포함(where:), replacement()), FormatStyle을 다룹니다. (날짜, 숫자, 측정값에 대한 .formatted()) 및 문자열 보간 패턴. 제네릭, 프로토콜, 열거형, 클로저 또는 최신 언어 기능과 관련된 핵심 Swift 코드를 작성할 때 사용합니다. 출처: dpearson2699/swift-ios-skills.