Agent skills for iOS, iPadOS, Swift, SwiftUI, and modern Apple framework development.
71
89%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Advisory
Suggest reviewing before use
Common Swift concurrency compiler warnings and errors with their fixes.
| Diagnostic | Cause | Fix |
|---|---|---|
Sending 'x' risks causing data races | Passing a non-Sendable value across isolation boundaries | Make the type Sendable, use sending parameter, or restructure to avoid the crossing |
Capture of 'x' with non-sendable type in a @Sendable closure | Closure captures non-Sendable value | Make type Sendable, copy the value, or use an actor |
Non-sendable type 'X' returned by implicitly asynchronous call | Returning non-Sendable from cross-isolation call | Make return type Sendable or keep work on same isolation |
Main actor-isolated property 'x' can not be mutated from a nonisolated context | Accessing @MainActor state from non-main context | Add @MainActor to caller, use await MainActor.run { }, or restructure |
Call to main actor-isolated function in a synchronous nonisolated context | Calling @MainActor function without await | Add await, annotate caller @MainActor, or use .task { } in SwiftUI |
Actor-isolated property 'x' can not be referenced from a nonisolated context | Accessing actor state without await | Add await or move code into the actor |
Type 'X' does not conform to protocol 'Sendable' | Stored properties aren't all Sendable | Make properties Sendable, use @unchecked Sendable with a lock, or redesign |
Passing closure as a 'sending' parameter risks causing data races | Closure captures values that could race | Ensure captures are Sendable or don't escape the isolation domain |
Task-isolated value of type 'X' passed as a strongly transferred parameter | Moving a value out of a task unsafely | Copy the value or use sending return |
Global variable 'x' is not concurrency-safe | Mutable global without isolation | Add @MainActor, make it nonisolated(unsafe) (with justification), or use actor |
With UpcomingFeature.InferSendableFromCaptures (Swift 6.2):
nonisolated(nonsending) is the new default for async functions (SE-0461)@concurrent marks functions that intentionally run off-actorStrictConcurrency: targeted in build settings — warns on Sendable issues without full enforcementStrictConcurrency: complete once warnings are resolved@preconcurrency import temporarily for third-party modules that haven't adopted Sendable — document removal planEnable the Thread Sanitizer (-sanitize=thread) to catch data races at runtime that the compiler can't statically prove.
Xcode: Edit Scheme → Run → Diagnostics → Thread Sanitizer.
Common TSan findings in concurrent code:
Dictionary or Array without actor protectionskills
accessorysetupkit
references
activitykit
references
adattributionkit
references
alarmkit
references
app-clips
app-intents
references
app-store-optimization
app-store-review
apple-on-device-ai
appmigrationkit
references
audioaccessorykit
references
authentication
references
avkit
references
background-processing
references
browserenginekit
references
callkit
references
carplay
references
cloudkit
references
contacts-framework
references
core-bluetooth
references
core-data
core-motion
references
core-nfc
references
coreml
references
cryptokit
references
cryptotokenkit
references
debugging-instruments
device-integrity
references
dockkit
references
energykit
references
eventkit
references
financekit
references
focus-engine
gamekit
references
healthkit
references
homekit
references
ios-accessibility
ios-localization
ios-networking
ios-simulator
references
mapkit
metrickit
references
musickit
references
natural-language
references
paperkit
references
passkit
references
pdfkit
references
pencilkit
references
permissionkit
references
photokit
push-notifications
realitykit
references
relevancekit
references
scenekit
references
sensorkit
references
speech-recognition
spritekit
references
storekit
swift-api-design-guidelines
swift-architecture
swift-charts
references
swift-codable
swift-concurrency
swift-formatstyle
swift-language
swift-security
references
swift-testing
swiftdata
swiftlint
swiftui-animation
swiftui-gestures
references
swiftui-layout-components
swiftui-liquid-glass
references
swiftui-patterns
swiftui-performance
swiftui-uikit-interop
swiftui-webkit
tabletopkit
references
tipkit
references
vision-framework
weatherkit
references
widgetkit
references