Get location every minute while app is terminated

Hi ,

I am working on a project, in which we need to access location of user every time whatever app is in foreground, background or have been terminated.

For foreground, background i can get the location by locationmanager using didchangelocations

For app terminated i am using startMonitoringSignificantLocationChanges


It work only when device move more than 500 meter , then app become alive and location manager delegate methods being execute.


My simple question is that

  1. can we get location every time while app have been terminated, not depend on the travelling distance or time.
  2. Apple will approve these kind of app, if we access location of user while app is running or not .


I will wait for your answer.

Do you know if that app is using standard, or significant-change services?


From the docs: Getting the User’s Location

  • If your iOS app must keep monitoring location even while it’s in the background, use the standard location service and specify the
    location
    value of the
    UIBackgroundModes
    key to continue running in the background and receiving location updates. (In this situation, you should also make sure the location manager’s
    pausesLocationUpdatesAutomatically
    property is set to
    YES
    to help conserve power.) Examples of apps that might need this type of location updating are fitness or turn-by-turn navigation apps.
  • If GPS-level accuracy isn’t critical for your app and you don’t need continuous tracking, you can use the significant-change location service. It’s crucial that you use the significant-change location service correctly, because these updates run continuously, around the clock, until you stop them, and can actually result in higher energy use if not employed effectively.


If you need high fidelity tracking, tho, I would perhaps not rely on a consumer grade mobile phone...there are far better and more reliable devices on the market that are purpose built just for such a task.


Good luck.

Get location every minute while app is terminated
 
 
Q