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
Context: Apple guidance on diagnosing SwiftUI performance with Instruments and applying design patterns to reduce long or frequent updates.
SwiftUI is declarative. Performance problems are usually one of two categories:
Both feel bad to users, but they require different fixes.
These usually come from expensive body evaluation, expensive layout, or hosted platform-view work.
These usually come from dependency fan-out, noisy observable state, or geometry and timer signals invalidating more of the tree than intended.
A practical workflow:
If you cannot reproduce the exact interaction on demand, your trace will be much harder to interpret.
Shows clusters of update activity over time. Good for spotting periods where the screen keeps re-evaluating even when no single event stands out.
Highlights expensive body work. These often point straight to code you can
simplify or move out of render paths.
Useful when SwiftUI hosts UIKit/AppKit content. If this lane is hot, inspect:
UIViewRepresentable / UIViewControllerRepresentableList row content with embedded platform viewsCaptures non-body SwiftUI work like layout, geometry, and update coordination.
Frame misses. These are the symptom users feel, not always the root cause.
Do not begin from total runtime. Begin from the expensive update itself.
Set inspection range on the slow update and inspect hot frames.
Common findings:
bodybody// DON'T
Text(Self.formatter.string(from: total as NSNumber) ?? "")
// DO
Text(viewModel.formattedTotal)The right fix is usually architectural, not micro-optimizing the same body code.
Frequent updates often look like "the screen keeps waking up" rather than "one frame is red."
Typical offenders:
@Observable root modelGood strategies:
Cache strings, sorted arrays, and other display-ready values before render.
A row should depend on row state, not screen state.
Only touch hosted UIKit/AppKit views when actual inputs changed.
Be careful when geometry changes trigger state changes that trigger layout again.
Use stable IDs, pre-filtered data, and consistent row counts.
After every performance change:
Performance fixes can accidentally change animation timing, placeholder states, or navigation behavior. Verify the UX, not just the graph.
Use these as default heuristics:
bodyWhen a screen still feels slow after obvious body cleanups, the next place to look is usually dependency fan-out, not isolated hot code.
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