Closed ChristopherJohnson25 closed 5 years ago
Hi there, so far i didn´t notice any issues. Is there any Error and/or Warning inside XCode to provide more informations?
Yes, I just tested again, it does work! However, for some reason it's not getting fired on React Native Swiper actions. More than likely a problem with that, thanks!
On second thought, do you mind confirming the usage of this?
I'm not able to get this to work on any action (I come from Ember land, so not sure if correct).
See code here,
click(){
ReactNativeHapticFeedback.trigger("selection");
}
<Button onPress={() => this.click()}>Selection Vibrate</Button>
Hi, sorry for the late response. this seems actually fine. Is there anything popping up as a warning? Note: the real haptic feedback on iOS is only available on iPhone 6s and up. Anything else needs to fall back to a vibrate. To enable this, just pass in the second argument as true
@mkuczera Having issues with ios 13 too with a warning:
RNReactNativeHapticFeedback is not available
With not much else
It's odd, it seems to work in some functions, and not in others. I'm new to React Native, so it could be user error.
I managed to log the error:
TypeError: Cannot read property 'trigger' of undefined at Function.RNReactNativeHapticFeedback.trigger (index.js:13)
At index.js of the package
For reference, my environment is:
.... "react": "16.8.3", "react-native": "0.59.10", "react-native-haptic-feedback": "^1.8.2" ....
My Podfile:
`platform :ios, '9.0'
target 'app' do rn_path = '../node_modules/react-native' pod 'React', path: rn_path, subspecs: [ 'Core', 'RCTActionSheet', 'RCTAnimation', 'RCTGeolocation', 'RCTImage', 'RCTLinkingIOS', 'RCTNetwork', 'RCTSettings', 'RCTText', 'RCTVibration', 'RCTWebSocket' ] pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'Firebase/Core', '~> 6.8.0' pod 'Firebase/Messaging', '~> 6.8.0' pod 'Firebase/DynamicLinks', '~> 6.8.0' pod 'Firebase/RemoteConfig', '~> 6.8.0' pod 'GoogleAppMeasurement', '6.1.1' pod 'Firebase/Auth', '~> 6.8.0' pod 'Firebase/Database', '~> 6.8.0' pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler' pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage' pod 'RNImageCropPicker', :path => '../node_modules/react-native-image-crop-picker' pod 'RNLocalize', :path => '../node_modules/react-native-localize' pod 'RNSound', :path => '../node_modules/react-native-sound'
pod 'RNReactNativeHapticFeedback', :path => '../node_modules/react-native-haptic-feedback'
end
post_install do |installer| installer.pods_project.targets.each do |target| targets_to_ignore = %w(React yoga) if targets_to_ignore.include? target.name target.remove_from_project end end end`
I've got the same issue,
I'm unsing React Native 0.61.2
, I'm also using autolink feature with use_native_modules!
inside Podfile
Calling trigger results in RNReactNativeHapticFeedback is not available
.
Hi, i will have a look on this after the weekend. In the meantime: Is the Haptic Feedback Package in the pod install logs?
Hi, i will have a look on this after the weekend. In the meantime: Is the Haptic Feedback Package in the pod install logs?
I finally made It work, and it was my mistake. The package was only set on one target and not in the one I was using at the moment. Working great now.
Hi! I'm still getting this message
"react-native": "0.61.5", "react-native-haptic-feedback": "^1.8.2",
@dnosk Hi did you find any solution for this?
I ended up writing it in Swift :/
Hi, i still can´t reproduce the issue. Do you guys have any repo project available? Also:
Had the same issue, but a clean build solved it.
Got same error, solved by manual linking with
npm link react-native-haptic-feedback && cd ios && pod install
Check your imports, use the following:
import ReactNativeHapticFeedback from 'react-native-haptic-feedback';
This does not seem to be working on iOS 13, has anyone been experiencing the same issues?