0

I have made an app that gets the user location and stores in local servers using web service and whenever user location data are required can be fetched by calling web service.

Now I want to add the functionality in such a way that when app is closed, in background state, or even in running state the method for fetching user location should call and keep on calling it in 5 to 10 minutes time interval and can call web services called in that code block.

I have referred to many tutorials Like this and methods like this and this -- This -- This to implement it, but could not come up with the method or way, or those codes are way too old.

So, if anyone knows how to implement these functionality, please guide me through it. I am new in performing background services. Let me know ,where I have to look and what methods should I have to add in it.

I am using xib - Objective-C - Xcode 8.3.

Fogmeister
  • 76,236
  • 42
  • 207
  • 306
Moxarth
  • 303
  • 4
  • 13
  • 2
    Please format your text so it is less of a http://www.urbandictionary.com/define.php?term=wall%20of%20text and more readable so we mere humans can understand it. – Fogmeister Jun 23 '17 at 13:09
  • You cannot execute at a specific time interval. You can monitor location in the background and only send updates to the server every 10 minutes but you will get location updates whenever there is a change in location; this can incur a significant energy use penalty. You can use a less expensive location update, such as significant location change but the user needs to move 500m or so before you will get an update. – Paulw11 Jun 23 '17 at 14:01
  • @paulw11 i got it what you want to say . but if you can provide few methods codes and the way to implement it . that would be great . and what are the new keys should be added in plist ? – Moxarth Jun 24 '17 at 05:15

0 Answers0