mkuczera / react-native-haptic-feedback

React-Native Haptic Feedback for iOS with Android similar behaviour.
MIT License
855 stars 103 forks source link

I don't get any haptic on IPhone 8 #77

Open fredmanxu opened 2 years ago

fredmanxu commented 2 years ago

Hi, I tested the package and it works fine on android.But nothing work on IPhone8. I tried all parameters of the method. I don't get any errors or warnings on the console.

My example code

    haptic() {
        const hapticOptions = {
            enableVibrateFallback: false,
            ignoreAndroidSystemSettings: true,
        };

        const hapticTriggerType = Platform.select({
            ios: 'selection',
            android: 'notificationSuccess'
        });

        ReactNativeHapticFeedback.trigger(hapticTriggerType, hapticOptions)
    }

Package version

   "react": "16.13.1",
   "react-native": "0.63.4",
   "react-native-haptic-feedback": "^1.13.0"

Test device info

Model name: iPhone8
Software Version: 14.5.1
VictorPulzz commented 2 years ago

Some issue on iPhone 6

cemalahmet commented 2 years ago

I have the same issue. iPhone 8, 14.8.1

Romick2005 commented 2 years ago

@VictorPulzz and @cemalahmet have you tried enableVibrateFallback: true? Probably your phone or older ios version is not support haptic feedback? Then you have to use fallback.

-(Boolean)supportsHaptic {
    return [[UIDevice currentDevice] systemVersion].floatValue >= 10.0
        && [DeviceUtils deviceVersion:@"iPhone"] > 8;
}
MaksymBaturinskyi commented 1 year ago

the same issue on ipone 11, is not working