> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mobster.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# mobster xray

> Map an app's screens and paywalls, or see who your apps talk to.

X-ray an app on your iPhone. `app` maps an app with App X-ray: Mobster taps through every control that opens a screen and writes a map of the screens, how they connect and the paywalls it found, with no model and no tap on anything that could act. `network` records the phone's traffic with Network X-ray and says which domains and companies each app talked to, reading hostnames, sizes and times only. `diff` compares two maps to see what an update changed. Everything stays on this Mac.

## Usage

```text theme={"theme":"css-variables"}
mobster xray [<command>]
```

```text theme={"theme":"css-variables"}
examples:
  mobster xray app com.apple.Preferences
  mobster xray app Weather --screens 60 --minutes 10
  mobster xray network --device "Test iPhone" --seconds 30
  mobster xray diff before/map.json after/map.json
```

## Commands

| Command | What it does |
| - | - |
| [`mobster xray app`](#mobster-xray-app) | map an app's screens, links and paywalls with no model |
| [`mobster xray network`](#mobster-xray-network) | record your iPhone's network traffic and say who each app talked to |
| [`mobster xray diff`](#mobster-xray-diff) | compare two maps of one app |

## `mobster xray app`

Map an app on your iPhone: Mobster taps through every control that opens a screen, within the limits you set, and writes the map (map.json), a report (report.html) and a thumbnail of each screen to a folder on this Mac. It reads paywalls and taps nothing on them. It never taps a control that could act (delete, send, buy, a switch, a field), never types, and calls no model, so it needs no key. It runs like any task: your plan, the phone's queue and Stop apply.

### Arguments and options

| Name | Default | Description |
| - | - | - |
| `APP` | required | the app's bundle ID, or its name on the phone |
| `--device NAME` | none | the iPhone to use (an id, UDID or name from `mobster devices`) |
| `--screens N` | 30 | stop after this many screens, 1 to 120 |
| `--minutes N` | 5 | stop after this many minutes, 1 to 30 |
| `--json` | off | print each event as one JSON line; the last is the result |

```text theme={"theme":"css-variables"}
exit codes: 0 mapped, 1 stopped or mapped nothing, 2 usage, 3 couldn't run (no phone, no plan, app not found,
            an app it doesn't map), 130 ctrl+c

examples:
  mobster xray app com.apple.Preferences
  mobster xray app Weather --screens 60 --minutes 10 --device "Test iPhone"
  mobster xray app com.example.yourapp --json
```

## `mobster xray network`

Record an iPhone's network traffic for a while and say who each app talked to: the domains, the companies behind them, and which do ads, analytics or attribution. Mobster reads hostnames, sizes and times. It decrypts nothing and keeps no page, no URL path and no address. The capture file is deleted after the analysis unless you pass `--keep-capture`.

### Options

| Name | Default | Description |
| - | - | - |
| `--device NAME` | the one connected | the iPhone: an id, UDID or name from `mobster devices` |
| `--seconds N` | 60 | how long to record, 5 to 3600 |
| `--wifi` | off | record over Wi-Fi even with the cable in (refused unless the link is encrypted) |
| `--app NAME` | none | report only this app, by its name on the iPhone |
| `--keep-capture` | off | keep the .pcapng beside the report (readable only by you) |
| `--json` | off | print one JSON object |
| `--from FILE.pcapng` | none | read a capture you already have, with no iPhone |

```text theme={"theme":"css-variables"}
exit codes: 0 done, 1 the capture failed, 2 usage, 3 couldn't run (no such iPhone, a simulator, no
            capture tool)

examples:
  mobster xray network --device "Test iPhone" --seconds 30
  mobster xray network --device "Test iPhone" --app Weather
  mobster xray network --from capture.pcapng
```

## `mobster xray diff`

Compare two maps `mobster xray app` wrote: the screens added, removed and changed, and the paywall prices that moved. Each argument is a map.json file or the folder that holds it. It reads two files on this Mac and needs no phone and no plan.

### Arguments and options

| Name | Default | Description |
| - | - | - |
| `BEFORE` | required | the older map: a map.json file or its folder |
| `AFTER` | required | the newer map: a map.json file or its folder |
| `--json` | off | print the comparison as JSON |

```text theme={"theme":"css-variables"}
exit codes: 0 compared (changes or none), 1 a map couldn't be read, 2 usage

examples:
  mobster xray diff before/map.json after/map.json
  mobster xray diff before after --json
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.