mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-20 17:13:32 +08:00
fix(skills): improve code examples in iOS 26 skills
- Add do-catch error handling to SwiftUI streaming example in foundation-models-on-device - Add Auto Layout constraints to UIKit glass effect example in liquid-glass-design - Promote build settings prerequisite from code comment to visible blockquote warning in swift-concurrency-6-2
This commit is contained in:
@@ -136,10 +136,9 @@ This mode is opt-in and recommended for apps, scripts, and other executable targ
|
||||
|
||||
When you need actual parallelism, explicitly offload with `@concurrent`:
|
||||
|
||||
> **Important:** This example requires Approachable Concurrency build settings — SE-0466 (MainActor default isolation) and SE-0461 (NonisolatedNonsendingByDefault). With these enabled, `extractSticker` stays on the caller's actor, making mutable state access safe. **Without these settings, this code has a data race** — the compiler will flag it.
|
||||
|
||||
```swift
|
||||
// Assumes Approachable Concurrency build settings are enabled:
|
||||
// SE-0466 (MainActor default isolation) and SE-0461 (NonisolatedNonsendingByDefault).
|
||||
// Safe mutation of cachedStickers via await depends on these compiler options.
|
||||
nonisolated final class PhotoProcessor {
|
||||
private var cachedStickers: [String: Sticker] = [:]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user