I am using GeoLocator package (version 9.0.2). I am able to get the location as long as the app is in foreground with the permission set to "While Using the App". As soon as the app goes in the background the location stops working and I get the following error:
LOCATION UPDATE FAILURE:Error reason: (null)Error description: The operation couldn’t be completed. (kCLErrorDomain error 1.)
I have enabled 'Location updates' in Background Modes Capability in Xcode. (https://github.com/Baseflow/flutter-geolocator/issues/948)
When permission is set to 'Always', I am able to get location as long as the phone's screen is on even when the app is in background. As soon as phone goes black/locked mode the location stops updating and have to open the app again for the process to start again.
What can I try next?