Let me answer your questions step-by-step:
After a while of not using the app, I don’t get location updates regularly. Even after that, I go into the app more often or even turn OFF and turn ON the permission again but the problem still doesn’t improve until I re-install the app.
iOS throttling your app in the background, Even if your app is not terminated, iOS may reduce background update frequency over time if it thinks you're using too much power or not offering user-visible value. iOS monitors usage patterns like frequent background updates without visible foreground usage, It may throttle location updates even when permissions are active.
Reinstalling helps because It resets internal iOS caches related to app background usage and battery backups.
It seems that apps downloaded from TestFlight can get location more continuously than apps downloaded from the App Store
We sometimes encounter this error in the logs: Error Domain=kCLErrorDomain Code=0 “(null)” Could you explain what might be causing this? I think my app was not terminated in the background because I still collect location but it is not as frequent. I want to know if Apple has any mechanism to prevent such apps from getting location continuously?
In your cllocation configuration, One thing contradiict with each other that is:
self.locationManager.pausesLocationUpdatesAutomatically = false
self.locationManager.desiredAccuracy = kCLLocationAccuracyBest
I would suggest don't start/stop updating location in 15 min interval, It will impact on device battery life too
try using below:
CLLocationManager().startMonitoringSignificantLocationChanges()