Recently, I found that our application can only run in the background for a short time and then gets interrupted by the system, even after enabling Always Allow Location and Background Running Permissions. This has caused me a lot of frustration because I need this application to run in the background constantly to track my location and other information.
Before version 16.4, this application could run in the background for a long time, even exceeding 24 hours. However, in the 16.4 test version, the background running time is limited to no more than 10 minutes, which makes it impossible for the software to run properly in the background.
Are you using showsBackgroundLocationIndicator = false or showsBackgroundLocationIndicator = true? Are you calling startUpdatingLocation() when the app is foregrounded or backgrounded?
I filed a bug report: https://feedbackassistant.apple.com/feedback/12082689
Before iOS 16.4, we could reliably start
CLLocationManagerin the background (for example, in response to aCLCircularRegionexit or aCLVisitarrival) by callingstartUpdatingLocation(), and keep it running indefinitely, assuming we had "Always" location permissions and the "Location updates" background mode. As of iOS 16.4, this no longer works reliably if theCLLocationManageris started when the app is backgrounded andshowsBackgroundLocationIndicator = false. It does still seem to work if theCLLocationManageris started when the app is foregrounded andshowsBackgroundLocationIndicator = true. We have seen a few similar reports on the developer forums: https://developer.apple.com/forums/thread/727015 https://developer.apple.com/forums/thread/726945 Did this behavior change in iOS 16.4? Thank you.