Skip to content

device.resetAppState([bundleId]) #4767

@noomorph

Description

@noomorph

Describe your idea

Proposal

Introduce a method:

await device.resetAppState(optionalBundleId);

This will:

  • iOS (simulator):
    Use xcrun simctl get_app_container to 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 with adb install, avoiding any Detox-managed build artifacts.

This enables full app state reset without rebuild. Faster, cleaner, reusable in both CI and local dev.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions