4

Is there any code that can illustrate how IFTTT does background sync?

It's basically a geolocation hack, but I'm wondering how it exactly works.

Anthony Glyadchenko
  • 3,572
  • 7
  • 48
  • 66
  • 5
    Is there a bot that automatically downvotes every question that gets asked now? This seems like a perfectly valid question to me. – Chris Devereux Jul 12 '13 at 17:36

1 Answers1

1

I'm not certain if this is what they're using, but you mentioned that it's a geolocation hack, and this Apple doc says (under "Implementing Long-Running Background Tasks") that you can add location to the UIBackgroundModes in an app's Info.plist to execute tasks in the background.

You'll need to go a bit beyond this to execute tasks even when the location hasn't changed -- see How do I get a background location update every n minutes in my iOS application? for how you could implement this, and iPhone - Backgrounding to poll for events for other methods of executing background tasks (in addition to using the geolocation hack).

Community
  • 1
  • 1
gtmtg
  • 3,010
  • 2
  • 22
  • 35