The reason I thought it was closing (not just deactivating or going to the background) was because during a few of my runs when I clicked the home button and then clicked on the app icon again it loaded the app from the beginning. I wasn't tracking which device or iOS version that happened on, but will reply to this if I can reproduce that behavior. Perhaps it crashed after hitting the home button making it look like it had closed.
Anyway, the Flox session timeout tip is really useful. On an older version of iOS my app crashes within seconds, so I've changed the session timeout to try to get ahead of the crash so I can catch some logs leading up to it.
On more recent versions of iOS it's not crashing but I wasn't getting any log data for the reason you pointed out - the app wasn't closing, so the 2nd run needed to get log data wasn't happening. The trick here is that the Device Farm virtual Home button doesn't have a double- or triple-tap feature.
I did some digging and found a vague tip about using iOS Assistive Touch. Here are complete instructions for anyone else who's interested:
To close an iOS app when using AWS Device Farm Remote Access:
- Go to the iOS Settings > General > Accessibility > Assistive Touch and turn it on
- With your app open tap the Assistive Touch bubble
- Tap Device > More > Triple-Click
- Swipe up to close the app
Thanks again! As always you've been a big help!