I have a Xamarin IOS app that I created for a customer that tracks their field agents movements and also manages their workflow. I use CLLocationManager to track the phone's current location and I use CMMotionActivityManager to monitor the user's activity so I can determine if they are driving or walking/running which allows me to check to see if they have arrived at a delivery point or their home. All users have location tracking to "Always Allow". Activity tracking is also set to always track. All the phones are 10 XR phones and are on the latest version of IOS. The app communicates with a web services layer for all data it needs for managing the user's job list. It also uses the services layer to send geolocation information. It also has a service for sending log entries. All outgoing communication is saved in a SQLite database and are only marked sent when the associated service confirms it has received the data.
It's extremely difficult to determine what the cause of the restarts are. I am monitoring memory usage, I have the code tightly wrapped to trap exceptions and exceptions are logged. Right now the only exceptions I see are when there is a network timeout which are expected since the agents are often times in areas with little or no network coverage.
Has anyone seen this type of behavior? I am seeing the app come up and then restart, run for a couple of minutes and they restart again, then run for hours and even days and restart again. You can see it in the Fast App Switcher and the page image looks correct but when you select it the app restarts.