Community-maintained Agent Skills for complete Swift and Apple-platform app delivery.
72
90%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Medium
Suggest reviewing before use
Compose, play, and verify custom haptic patterns with CoreHaptics. Scope:
Swift 6.3, iOS 26+, and supported physical hardware.
Use the smallest API that expresses the interaction:
| Need | Owner |
|---|---|
| Standard success, warning, selection, impact, or SwiftUI state feedback | sensoryFeedback or UIKit feedback generators; see swiftui-patterns |
| Custom waveform, sustained feedback, live modulation, or synchronized haptic/audio | This skill and Core Haptics |
| Ordinary audio playback, routing, recording, or audio-session policy | AVFAudio/AVKit guidance, not this skill |
| Controller rumble | Core Haptics controller APIs; keep controller discovery/input in the game-controller owner |
Do not introduce CHHapticEngine for a normal button tap. Custom haptics add lifecycle,
hardware, interruption, power, and physical-device test responsibilities.
CHHapticEngine.capabilitiesForHardware() before creating an engine.stoppedHandler and resetHandler before starting the engine.Load Core Haptics patterns when writing engine ownership, programmatic events, live modulation, parameter curves, or AHAP playback.
Core Haptics is not universally available. Apple specifically lists devices such as iPad, iPod touch, and Apple Vision Pro among devices without haptic feedback support. Check capability at runtime rather than inferring it from platform or model.
import CoreHaptics
struct HapticCapability {
let supportsHaptics: Bool
let supportsAudio: Bool
static var current: Self {
let hardware = CHHapticEngine.capabilitiesForHardware()
return Self(
supportsHaptics: hardware.supportsHaptics,
supportsAudio: hardware.supportsAudio
)
}
}Keep the product action successful when haptics are unavailable. Provide visual or audio confirmation only when it is appropriate; never make haptics the sole carrier of state or error information.
start().stoppedHandler as an external-stop notification. It may run off the main
thread and is not called for an explicit stop(completionHandler:).resetHandler as invalidation of previously prepared engine resources.
Restart the engine and recreate any players or registered audio resources the
feature still needs.isAutoShutdownEnabled and tolerate automatic idle shutdown/restart behavior.Do not assume foregrounding alone repairs an interrupted engine. Recovery belongs in the engine handlers and should be idempotent.
Use CHHapticEvent and CHHapticPattern when timing and values derive from live
application state or the pattern is small. A transient event is a short impulse; a
continuous event has a duration and must be stopped at the interaction boundary.
Use bundled .ahap assets when designers need to tune a reusable sequence without
rewriting Swift. AHAP represents events, dynamic parameters, parameter curves, and
optional synchronized custom audio. Validate the asset in the app bundle and handle
load/play errors rather than silently force-unwrapping its URL.
CHHapticEventParameter defines an event's initial intensity, sharpness, or envelope.CHHapticParameterCurve schedules gradual changes as part of a pattern.CHHapticDynamicParameter changes a running player immediately.Do not confuse event parameter identifiers such as .hapticIntensity with dynamic
control identifiers such as .hapticIntensityControl.
Use makePlayer(with:) for fixed start/stop playback. Use
makeAdvancedPlayer(with:) when the feature needs looping, pause/resume, seeking,
completion callbacks, or reusable granular control.
For a gesture-driven continuous haptic:
Intensity and sharpness are perceptual controls, not a guarantee of identical output across hardware. Tune on every supported device family in scope.
Simulator can compile Core Haptics code but cannot validate the tactile result. Test on supported physical hardware and record:
Compile verification proves API availability only. Product review must assess whether the feedback is distinguishable, proportional, and not fatiguing.
sensoryFeedback already expresses the intent..tessl-plugin
skills
accessorysetupkit
references
activitykit
adattributionkit
references
alarmkit
references
app-clips
app-intents
app-store-optimization
app-store-review
apple-on-device-ai
appmigrationkit
audioaccessorykit
references
authentication
references
avfoundation-audio
references
avkit
background-processing
references
browserenginekit
callkit
references
carplay
cloudkit
contacts-framework
references
core-bluetooth
references
core-data
core-haptics
references
core-motion
references
core-nfc
references
coreml
references
cryptokit
cryptotokenkit
debugging-instruments
device-integrity
references
energykit
references
eventkit
family-controls
references
financekit
focus-engine
gamekit
git-branching-workflow
references
healthkit
references
homekit
references
ios-accessibility
ios-app-workflow
references
ios-ettrace-performance
ios-localization
ios-memgraph-analysis
ios-networking
ios-simulator
references
metrickit
references
musickit
references
natural-language
paperkit
references
passkit
references
pdfkit
pencilkit
references
permissionkit
references
photokit
push-notifications
quicklook
references
realitykit
references
relevancekit
references
scenekit
sensorkit
shazamkit
references
speech-recognition
references
spritekit
storekit
swift-api-design-guidelines
swift-architecture
references
swift-charts
swift-codable
references
swift-code-review
swift-concurrency
swift-formatstyle
references
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-responsive-layout
swiftui-uikit-interop
swiftui-webkit
tabletopkit
tipkit
vision-framework
weatherkit
references