Posts

Post not yet marked as solved
14 Replies
35k Views
I am writing an iOS app that requires continuous location updates while being in the background. I am using CLLocationManager and here is what I am doing:1) Requesting always authorization2) Enabling background location in info.plist3) Setting allowsBackgroundLocationUpdates to true4) Starting location updates while in the foregroundThe app gets location updates when in foreground. App also continues to get location updates in background every 1 second, until some time when the app gets suspended and does not get any further location updates. When the app gets suspended varies from anywhere between few 10s of minutes to hours. I have even noticed that the app sometimes does not get suspended but stops getting location updates.My question is: is there a way to continuously get location updates indefinitely (or say for 24 hours) with the app in the background and not getting suspended. And if the app gets suspended, is there a way to wake up the app and resume getting continuous location updates without the user bringing the app to the foreground?I have tried significantLocationUpdate to wake up the app and restart my location manager. With this I am able to get significantLocationUpdates for days but I get location updates about once every 5 minutes (while driving) but the location manager that I create and start to get continous frequent locations does not return any locations. I would like to get it more frequently, like once every few seconds.Any help would be much appreciated.Thanks.
Posted
by karela.
Last updated
.