I have a Swift program that gets the user location based on certain conditions and save the location to a local database.
The application can also run on the background state. Since I need to get a very accurate location, it can take up to 60 seconds to get the location. If location is determine in less than 5 sec, everything works fine while app is running on the background. If it takes more than 5 secs to get the location, then nothing will happen. I think the reason is because you have only a few seconds to complete the background task.
So is it possible to request up to 60 secs for the background task to run? Do I need to add any special code to tell the OS please allow more time (up to 60 secs) for the background task to complete?