Open kapilpau opened 5 years ago
UPD: There no automatic linking. You have to add native module manually to your native project settings.
Original: The same issue on my side. Will try to debug
have the same issue on iOS. android works fine. react-native: 0.61.2 . used linking command manually. for ios project imported as a pod.
TypeError: null is not an object (evaluating '_reactNativeTorch.default.switchState')
UPD: It's start working after cleaning cache in Xcode and pod install
command.
On both Android and iOS, when trying to switch state, I get: TypeError: undefined is not an object (evaluating 'u.switchState')
I get the error if I try to import TorchWithPermissionCheck or Torch from 'react-native-torch' and then run Torch.switchState(true)