| name | swift |
| description | Swift development for iOS/macOS with SwiftUI, async/await, and Combine. Use for .swift files. |
Swift
Modern Swift development with protocol-oriented programming and async/await.
When to Use
- Working with
.swift files
- Building iOS/macOS applications
- SwiftUI development
- Server-side Swift with Vapor
Quick Start
struct User: Identifiable, Codable {
let id: UUID
var name: String
var email: String
var displayName: String {
name.capitalized
}
}
Core Concepts
Value Types & Structs
struct User: Identifiable, Codable, Hashable {
let id: UUID
var name: String
var email: String
var createdAt: Date .now
}
: , {
invalidURL
noData
decodingError()
errorDescription: ? {
{
.invalidURL:
.noData:
.decodingError( error):
}
}
}