A UI test can pass or fail depending on what the previous run left behind. An app might still be signed in, have cached data, or open on a screen the test wasn't expecting.
Since v0.29.0, tapflow flow run resets device state before running flows. The reset isn't identical on iOS and Android, and it doesn't make the entire device clean.
What happens before a flow runs
By default, tapflow clears app data for the build under test and any other apps referenced by the flows.
On iOS, when the relay can identify the build's app, tapflow uninstalls it instead. The reset also clears:
Keychain data
Privacy permissions managed by simctl privacy
Pasteboard contents
Simulated location
These are device-wide changes. If you run a flow on a simulator someone else is using, their sign-ins can be cleared too.
Root certificates installed through simctl keychain add-root-cert remain trusted.
Android has a narrower reset. It clears data for the relevant apps and, on emulators streamed over gRPC, clears the clipboard.…