cdp_mmkv
Read/write the app’s MMKV storage from Hermes. Closes the iteration-loop gap where tests had to xcrun simctl uninstall + reinstall to clear cooldowns/timestamps/feature flags. Requires react-native-mmkv v3+ (Nitro-based) — older versions exposed via TurboModule are not reachable. Returns __agent_error if MMKV / NitroModulesProxy is unavailable in the runtime. Actions: get|set|delete|has|keys|clear. Use sparingly: writing to MMKV bypasses the real user flow, so only use during test setup/teardown, not as a substitute for UI interaction (see “Verification Fidelity” rule).
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
action | `enum: get | set | delete | has | keys |
key | string | No | Required for get/set/delete/has actions | ||
value | unknown | No | Required for set action. Combine with type to disambiguate (default: string) | ||
type | `enum: string | number | boolean` | No | |
instanceId | string | No | MMKV instance id (default: “mmkv.default”) |
cdp_mmkv(action: <enum: get | set | delete | has | keys | clear>)