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
Warning-severity issues, programmatic test cancellation, and image attachments for Swift Testing.
ST-0013 adds a severity parameter to Issue.record(). Warnings are surfaced in test output but do not cause the test to fail.
@Test func dataIntegrity() {
let result = loadData()
// Hard failure — test fails
#expect(result.isValid)
// Warning — logged but test still passes
if result.processingTime > 2.0 {
Issue.record(
"Processing took \(result.processingTime)s — exceeds 2s target",
severity: .warning
)
}
}Use warnings for:
ST-0016 adds try Test.cancel() to stop a test from within without marking it as passed or failed. The test is recorded as "cancelled."
@Test func requiresNetwork() throws {
guard NetworkMonitor.shared.isConnected else {
try Test.cancel("No network — skipping integration test")
}
let response = try await APIClient.shared.healthCheck()
#expect(response.status == .ok)
}Key differences from other mechanisms:
withKnownIssue — marks a failure as expected (test still runs)try Test.cancel() — marks the test as cancelled (neutral outcome, test stops)ST-0012 allows exit tests to capture values from the enclosing scope. Previously, #expect(exitsWith:) closures could not reference local variables.
@Test func exitCodeValidation() async {
let expectedCode: Int32 = 42
await #expect(exitsWith: .failure) {
exit(expectedCode) // Can now capture `expectedCode`
}
}ST-0014 adds cross-import overlays for attaching images to test results. When you import both Testing and a UI framework, attachment initializers for platform image types become available.
import Testing
import UIKit
@Test func renderedOutput() async throws {
let view = ChartView(data: sampleData)
let renderer = UIGraphicsImageRenderer(size: CGSize(width: 400, height: 300))
let image = renderer.image { ctx in
view.drawHierarchy(in: view.bounds, afterScreenUpdates: true)
}
// Attach UIImage directly — available via cross-import overlay
Attachment(image, named: "chart-output").record()
}Supported types via overlays:
UIImage (when importing UIKit)CGImage (when importing CoreGraphics)NSImage (when importing AppKit — macOS)| Proposal | Feature |
|---|---|
| ST-0009 | Attachments API (Attachment type, .record()) |
| ST-0012 | Exit test value capturing |
| ST-0013 | Warning-severity issues (Issue.record with severity:) |
| ST-0014 | Image attachments on Apple platforms (cross-import overlays) |
| ST-0016 | Programmatic test cancellation (try Test.cancel()) |
skills
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