haptics

Implement iOS haptic feedback with UIFeedbackGenerator and Core Haptics.

1.1k|81|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/CharlesWiltgen/Axiom --skill haptics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: haptics
Source: https://github.com/CharlesWiltgen/Axiom/tree/main/.claude-plugin/plugins/axiom/skills/haptics
Command: npx skills add https://github.com/CharlesWiltgen/Axiom --skill haptics

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a structured approach to implementing tactile feedback, from simple UIFeedbackGenerator to advanced Core Haptics, with patterns for audio-haptic synchronization.

Core Features & Use Cases

  • When to use UIFeedbackGenerator vs Core Haptics.
  • AHAP patterns and synchronization with audio.
  • Debugging haptic issues and optimizing battery impact.

Quick Start

Add a medium impact haptic on button tap with immediate feedback using UIImpactFeedbackGenerator.

Frequently Asked Questions about haptics

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add haptic feedback to iOS buttons and interactions?

Haptic feedback on iOS uses UIImpactFeedbackGenerator for simple tactile responses on button taps and gestures. Import UIKit, instantiate UIImpactFeedbackGenerator with a style (light, medium, heavy), and call impactOccurred() to trigger immediate feedback. Works on iPhone 8+ with iOS 10+.

When should I use Core Haptics instead of UIFeedbackGenerator?

Use Core Haptics (CHHapticEngine) for complex, synchronized haptic patterns beyond standard impact feedback. Core Haptics supports AHAP pattern files, audio-haptic synchronization, and fine-grained control. Requires iOS 13+ and iPhone 8+; UIFeedbackGenerator suffices for simple notifications.

What are AHAP patterns and how do I create them?

AHAP (Apple Haptic Audio Pattern) files define custom haptic sequences with timing and intensity control. Create them as JSON structures specifying haptic events synchronized with audio, then load via CHHapticEngine. Enables precise tactile feedback design beyond built-in generators.

How do I synchronize haptic feedback with audio playback?

Core Haptics supports audio-haptic synchronization by loading AHAP patterns timed to match audio events. Use CHHapticEngine to schedule haptic events at specific timestamps relative to audio playback, ensuring tactile feedback aligns with sound cues for cohesive user experience.

Why is my haptic feedback not working on the simulator?

Haptic feedback only functions on physical devices (iPhone 8+); simulators cannot reproduce tactile output. Debug by testing on hardware directly. Use logging to verify CHHapticEngine initialization and event scheduling on device; performance optimization differs between simulator testing and production.

How do I optimize haptic feedback to minimize battery drain?

Limit haptic intensity and duration, avoid continuous patterns, and use UIFeedbackGenerator for simple cases instead of Core Haptics overhead. Profile battery impact on device; batch haptic events and disable during low-power mode. Balance user experience against sustained performance.