This is in regards to a Xamarin Forms project, but the iOS flavor of the app.
We have a task that needs to run every minute when our app is running in the foreground or background. It works great in the foreground, but when the app is backgrounded, the service pauses until the app comes to the foreground again.
Is it possible to continue to run a thread even after the app is backgrounded?
And, I am not referring to background app refreshes. We are trying to use the Xamarin.Essentials Geolocation class to get current GPS points, but it only runs when queried (doesn't raise an event when a GPS event occurs), so our thread queries the Geolocation library for updates. We need this to continue to run even when the app is backgrounded.
I think you should use background service
https://robgibbens.com/backgrounding-with-xamarin-forms/
Yes, a background service is a better choice.
The link VovaKamishnikov post is a good sample to start in Xamarin Form.
Before you start, you can watch the tutorial first.
https://docs.microsoft.com/en-us/xamarin/ios/app-fundamentals/backgrounding/
Answers
I think you should use background service
https://robgibbens.com/backgrounding-with-xamarin-forms/
Yes, a background service is a better choice.
The link VovaKamishnikov post is a good sample to start in Xamarin Form.

Before you start, you can watch the tutorial first.
https://docs.microsoft.com/en-us/xamarin/ios/app-fundamentals/backgrounding/