Search code examples
iosswiftbackground-processapple-maps

How much time update location in background mode


Actually, I'm litter bit confuse. I'm developing one App like driver and passenger. In the driver side if I start my drive by click on start button then the user will be move on apple map forget route direction.

When apple map will open at that time my App will be in background mode and Driver sending his/her current location to Passenger.

So question is that How much time we can send the current location to the passenger. As per my knowledge in iOS app will be alive 10 min. in Background mode. (Not sure maybe)

So how can I increase background time for keep alive the app background mode? Obesely there will be call API for send Driver current location to Passenger.


Solution

  • If you have background location updates enabled and "always" location permission and you have enabled location updates prior to your app entering the background then your app will continue to receive location updates indefinitely.

    You only have a few seconds to process each update, but that should be plenty of time to send a short transaction to your server.