I recently came across Google Calendar iOS app, and it provides a crisp-yet-very-light haptic feedback when dragging or creating events. I'm trying to implement the same.
I figured out that the UIImpactFeedbackGenerator
's .light
impact is still too strong for my requirement.
After a bit of digging, I came across CHHapticEngine
from the 'Core Haptics' library which supports custom haptics when provided with 'sharpness' and 'intensity' parameters. But it seems like this CHHapticEngine
does not work on an iPhone 7 Plus and Google has somehow pulled this off.
CHHapticEngine
does not work?
1) CHHapticEngine.capabilitiesForHardware().supportsHaptics
returns false
2) When I try to use it without the check, it returns:
(com.apple.CoreHaptics error -4809.)
So, is there another way to generate custom haptics(with varying sharpness and intensity levels) that works universally on all iOS devices that have Taptic Engine? TYIA!