I am seeing some unexpected behavior, in particular, is seems that iOS is periodically foregrounding my test app with no user intervention. I am curious why this is.
I wrote a simple test app to see how long the app would run to collect location while in the background with only "While in Use" location permission. The app will start location updates when foregrounded and continue in the background. While backgrounded, I see the blue arrow in the dynamic island as expected. What is unexpected is that every few days, I see the UI of the app displayed in the foreground, without having foregrounded it myself (and no, I did not tap the blue arrow).
This is using the legacy CoreLocation apis on iOS 17.5.1.
My question is how/why does this happen?