A simple and expressive haptic feedback generator for iOS apps.
Haptica is a Swift library that provides an easy-to-use API for generating haptic feedback on iOS devices. It simplifies the integration of tactile responses into applications, enhancing user experience by providing physical feedback for interactions. The library supports standard UIKit haptic types, semantic feedback variants, custom vibration patterns, and leverages the modern Core Haptics framework.
iOS developers building apps that require tactile feedback for user interactions, such as those creating games, productivity tools, or accessibility-enhanced applications. It is particularly useful for developers seeking a simple, expressive API to add haptics without dealing with low-level complexities.
Developers choose Haptica for its clean, straightforward API that makes haptic feedback integration easy while supporting both legacy and modern iOS haptic systems. Its unique selling points include semantic feedback types for common interactions, custom vibration patterns with symbolic notation, and built-in UIButton extensions for quick implementation.
Easy Haptic Feedback Generator 📳
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows triggering haptic feedback with minimal code, such as `Haptic.impact(.light).generate()` in a single line, reducing boilerplate.
Provides expressive variants like success, warning, start, and stop, which internally map to appropriate UIKit or Core Haptics effects for intuitive user interactions.
Supports creating complex haptic sequences using symbolic notation (e.g., '..oO-Oo..') or structured note arrays, enabling fine-grained control over tactile feedback.
Includes extensions for UIButton with properties like `isHaptic` and `hapticType`, allowing haptics to be added to buttons with just a few lines of code.
Requires a device with a Taptic Engine, so haptic feedback won't work on older iPhones or some iPad models, limiting app compatibility.
Advanced features like playing patterns from .ahap files are only available on iOS 16+, and Core Haptics support is version-dependent, complicating backward compatibility.
Exclusively targets iOS; lacks support for other Apple platforms like macOS, watchOS, or tvOS, necessitating separate implementations for multi-platform apps.