title: React-Native: Background app refresh while app closed
body: <p>I need to update app's database every 30 or 60 minutes. After lots of search i've found this module :</p>
  
  <p><a href="https://github.com/transistorsoft/react-native-background-fetch" rel="nofollow">https://github.com/transistorsoft/react-native-background-fetch</a></p>
  
  <p>As it says in its page:</p>
  
  <blockquote>
    <p>iOS Background Fetch is basically an API which wakes up your app about
    every 15 minutes (during the user's prime-time hours) and provides
    your app exactly 30s of background running-time. This plugin will
    execute your provided callbackFn whenever a background-fetch event
    occurs. There is no way to increase the rate which a fetch-event
    occurs and this plugin sets the rate to the most frequent possible
    value of UIApplicationBackgroundFetchIntervalMinimum -- iOS determines
    the rate automatically based upon device usage and time-of-day (ie:
    fetch-rate is about ~15min during prime-time hours; less frequently
    when the user is presumed to be sleeping, at 3am for example).</p>
  </blockquote>
  
  <p>What if i write some code in swift? I'm using sqlite in react native to store my data. if i write some code in swift which wakes up and check for new data, can i access the same database that i used to store my data in react native?</p>
  
  <p>I'm using react-native-sqlite-storage to store my data in react native.</p>
  
  <p><a href="https://github.com/andpor/react-native-sqlite-storage" rel="nofollow">https://github.com/andpor/react-native-sqlite-storage</a></p>