No workaround for the current approach with XCUITests at this time. We are currently looking at some other test frameworks (maestro https://maestro.mobile.dev/). Maestro has a clearState command which works for our app (https://maestro.mobile.dev/api-reference/commands/clearstate). Maestro uses idb (https://github.com/facebook/idb) under the covers.
This command appears to clear data under ~/Library/Developer/CoreSimulator/Devices//data/Containers/Data/Application/.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: