Detox
Detox copied to clipboard
device.resetAppState([bundleId])
Describe your idea
Proposal
Introduce a method:
await device.resetAppState(optionalBundleId);
This will:
-
iOS (simulator): Use
xcrun simctl get_app_containerto locate the installed.app, back it up, uninstall the app, then reinstall from the backup — all without triggering a Detox build. -
Android (emulator): Either:
- Use
adb shell pm clear <package>if sufficient - Or: back up the APK path via
adb shell pm path, uninstall, and reinstall withadb install, avoiding any Detox-managed build artifacts.
- Use
This enables full app state reset without rebuild. Faster, cleaner, reusable in both CI and local dev.