react-native-background-timer
react-native-background-timer copied to clipboard
[iOS] Clear timeout
Hi!
There is any way to clear a timeout in iOS? I saw that method is commented in iOS source code (RNBackgroundTimer.m)
/*
RCT_EXPORT_METHOD(clearTimeout:(int)timeoutId
resolver:(RCTPromiseResolveBlock)resolve
rejecter:(RCTPromiseRejectBlock)reject)
{
// Do nothing :)
// timeout will be ignored in javascript anyway :)
}*/
Thanks!!
On iOS, I used the primary fonction cleartimeout to clear this timeout:
BackgroundTimer.start(); timeroutID = setTimeout(() => { TrackPlayer.pause(); logInfo('BackgroundTimer=END'); }, duration); BackgroundTimer.stop();