Skip to content

Reference

device_reset_state

Reset permissions/storage and relaunch the authority-bound app on its exact claimed device, then reconnect and re-prove the session target.

NameTypeRequiredDefaultConstraintsDescription
appIdstringNoAuthority-bound app identifier; normally injected by the session
platformenum: ios | androidNoAuthority-bound platform; conflicting values are refused
deviceIdstringNoAuthority-bound exact device identifier; normally injected by the session
permissionsarrayNoPermissions to revoke/reset before relaunch. String shorthand defaults to revoke. Each entry is processed via device_permission.
storageKeysarrayNoMMKV keys to delete before terminate (so the app reads cleared values on next launch). Skipped if CDP is not connected.
mmkvInstanceIdstringNoForwarded to cdp_mmkv. Defaults to mmkv.default.
relaunchbooleanNoLaunch the app after terminate. Default true.
waitForReadybooleanNoAfter relaunch, wait for CDP reconnect + helpers injection. Default true. Set false to return immediately and let the caller poll.
waitForNavReadybooleanNoAfter helpers, also wait for globalThis.NAV_REF to expose a non-empty navigation state. Default false.
device_reset_state()