Open guthriet1230 opened 2 years ago
same issue
TypeError: null is not an object (evaluating '_reactNativeIdleTimer.default.setIdleTimerDisabled')
Same result here. My setup is tvOS with react-native-tvos@0.71.7-0rc1. I have another native library which works well in my project.
About the install instructions, I think currently it is not necessary to do react-native link
anymore. This was for react-native pre 0.60. So I did (cd ios && pod install)
.
I currently worked around the problem by calling directly setIdleTimerDisabled
when the app is activated, but I would like to use this library to have finer grain control.
[application setIdleTimerDisabled:YES];
I downloaded the package and pod installed. i reran my metro server and when i navigate to my camera screen, the code is fired and BOOM...
null is not an object (evaluating '_reactNative.NativeModules.KCKeepAwake.activate')
"react-native": "0.69.3", "react-native-idle-timer": "^2.1.7",
import IdleTimerManager from 'react-native-idle-timer';
within my component useEffect(()=>{ if(isRecording){ IdleTimerManager.setIdleTimerDisabled(true); } else{ IdleTimerManager.setIdleTimerDisabled(false); } },[isRecording])