2

Is there a good/safe/legal/responsible way for me to run code indefinitely at a scheduled interval while the app is in the background or while it's quitted? I'm trying to build a feature into my app where the user can start a logging system that continuously grabs (local) data and send notifications depending on the data, even while the app is in the background or the device is asleep. My app will also send notifications depending on this data. My app is not pulling/fetching data from an internet/push source.

I've read Apple's documentation on Background Execution and this tutorial on iOS Background Modes. I understand the various types of background modes supported in iOS. What I'm looking for is similar to the Background Fetch feature or the "Whatever" feature, but neither does exactly what I'm looking for (one is scheduled by iOS's own system while other one ends after a finite length).

Thanks in advance for your help!

Microbob
  • 672
  • 5
  • 20
  • 1
    What sort of “(local) data” are you grabbing? As you know from the documents you’ve read that Apple doesn’t permit indefinite scheduled interval background operation, but there are all sorts of special mechanisms for particular purposes. If you can tell us what you’re trying to “grab”, we might be able to help you... – Rob Jan 02 '19 at 01:08
  • 1
    I would like to log the amount of bits that flow from the wwan and WiFi atenae. – Microbob Jan 03 '19 at 11:02
  • Unfortunately you may be out of luck, then. Sorry. – Rob Jan 03 '19 at 15:20
  • Alright, thanks for your help! – Microbob Jan 04 '19 at 19:22

0 Answers0