# Push and memory warnings (/docs/sims/conditions/events)



Two one-off events rather than states: nothing is held on the device afterwards.

```ts
await device.push({ aps: { alert: { title: "Order shipped" } } });
await device.memoryWarning();
```

| Member                         | iOS simulator                                                                | Android emulator                                          |
| ------------------------------ | ---------------------------------------------------------------------------- | --------------------------------------------------------- |
| `push(payload, { bundleId? })` | delivers the payload to the app (`simctl push`, needs `aps`, 4096 bytes max) | `E_UNSUPPORTED`                                           |
| `memoryWarning({ bundleId? })` | `E_UNSUPPORTED`: the `lowmemory` notification never reaches a UIKit app      | `am send-trim-memory RUNNING_CRITICAL` to the running app |

## By hand [#by-hand]

```bash
warden ui push '{"aps":{"alert":"Order shipped"}}'
warden ui push ./payload.json
warden ui memory-warning
```

`--app <bundle>` names the app. `memory-warning` fails `E_APP_UNAVAILABLE` when the app is not running.
