79621462

Date: 2025-05-14 12:28:45
Score: 4
Natty:
Report link

Let me answer your questions step-by-step:

  1. 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.

    1. 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.

    2. Reinstalling helps because It resets internal iOS caches related to app background usage and battery backups.

  2. It seems that apps downloaded from TestFlight can get location more continuously than apps downloaded from the App Store

    1. Its because TestFlight builds consider as development build with fewer restrictions while AppStore builds check full management end-to-end based on user patterns, battery states and many more things, Also it priorities the device health first if your app doing something which is not good for device
  3. 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?

    1. This error means system-level reset => in simple word CLLocationManager stopped/started unexpectedly

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()
Reasons:
  • Blacklisted phrase (1): I want to know
  • RegEx Blacklisted phrase (2.5): Could you explain what
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-1):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Anjali jariwala