Search code examples
iosobjective-cswiftcore-locationbackground-fetch

Background Fetch and Core Location with schedule


I need to track users first and last coordinates scheduled.

For example: I set to track location from 10.00AM to 12.00AM and I need to store first location(at 10.00AM) and last location(at 12.00AM). I try to use background fetch, but I havent idea to make that work.

I need only this two points. How I can take them?

I cant use server and notifications


Solution

  • Use a silent push notification to trigger background processing, then starting location updates might work.

    You'd need get permission from the user to get location updates always, and you'd need to request background time when the push notification came in.