From e353a1a5d31522218234f7d9bac191d87a935817 Mon Sep 17 00:00:00 2001 From: systemBlue <290303321+systemblueio@users.noreply.github.com> Date: Thu, 25 Jun 2026 20:38:34 -0400 Subject: [PATCH] docs: add Swift/SwiftUI section to platform-native.md (#313) Closes #299. The "does the platform already do this?" rung is especially rich on Apple platforms, but the doc had no Swift coverage. Adds a Swift/SwiftUI section in the existing two-table format: SwiftUI controls and the Swift/framework layer, with library carve-outs kept inline to match the `ms` / `requests` style already in the doc. Claude-Session: https://claude.ai/code/session_01MtGgxEbiXPQjqMyXWbnixn Co-authored-by: Claude Opus 4.8 (1M context) --- docs/platform-native.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/docs/platform-native.md b/docs/platform-native.md index afb4cfe..11e7d6e 100644 --- a/docs/platform-native.md +++ b/docs/platform-native.md @@ -86,6 +86,44 @@ const debounce = (fn, ms) => (...args) => { clearTimeout(t); t = setTimeout(() = --- +## Swift / SwiftUI + +UI components people reach for a library or a custom view for. + +| You think you need | What the platform has | +|---|---| +| Date/time picker library | `DatePicker` | +| Color picker library | `ColorPicker` | +| Search bar + filtering | `.searchable(text:)` | +| Pull-to-refresh library | `.refreshable { }` | +| Swipe-to-delete / row actions | `.swipeActions { }` | +| Async image loading + cache | `AsyncImage` | +| Charting library | Swift Charts (`import Charts`) | +| Markdown rendering | `Text(...)` markdown / `AttributedString(markdown:)` | +| Share sheet wrapper | `ShareLink` | +| Loading spinner | `ProgressView()` | +| Photo picker | `PhotosPicker` | +| Map SDK (basic) | `Map` (MapKit for SwiftUI) | +| Grid layout library | `Grid` / `LazyVGrid` | + +Frameworks and stdlib that wrappers wrap. + +| You think you need | What the platform has | +|---|---| +| JSON library (SwiftyJSON) | `Codable` + `JSONDecoder` / `JSONEncoder` | +| HTTP client (Alamofire, simple use) | `URLSession` async/await; Alamofire earns it for complex retry/multipart at scale | +| Date/number/currency formatting | `.formatted()` / `FormatStyle` | +| Regex library | Swift regex literals + `Regex` | +| Crypto library (CryptoSwift) | `CryptoKit` | +| Keychain wrapper | Security `SecItem`; a few lines, not a dependency | +| Persistence / ORM | `SwiftData`, or `@AppStorage` for small key-values | +| Logging library | `Logger` (`os.log`) | +| UUID / Base64 helpers | `UUID()`, `Data(...).base64EncodedString()` | +| Image downsampling | ImageIO `CGImageSourceCreateThumbnailAtIndex` | +| Combine wrappers for async | async/await + `AsyncSequence` | + +--- + ## Node.js Standard Library Packages that wrap Node built-ins.