Skip to content

openUmbrella/react-native-inback-timer-ios

Repository files navigation

react-native-inback-timer-ios

the react native timer that can run in iOS app background state

Install

npm install --save react-native-inback-timer-ios

ScreenShoot

screen-shoot

Features

  1. it's a timer can run in background state
  2. support ios only
  3. provide the same API with javascript (setTimeout, setInterval, clear) etc.

Usage

  1. you need link library react-native-inback-timer-ios (don't know linking ? scan here first)
  2. import react-native-inback-timer-ios in your container
import BGTimer from 'react-native-inback-timer-ios';
  1. start your timer
let timerID = BGTimer.setInterval(() => {
    // do something..
    });
}, 1000);
                    
// ...
BGTimer.clear(timerID);

or


let timerID = BGTimer.setTimeout((data) => {
    // time out!
}, 9000);

About

the react native timer that can run in iOS App background state

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published