# iOS Cold Wallet — Plan 5 Smoke Test

Tests watch-only export. Run on iPhone 17 simulator or real device.

(Receive screen was scoped out — the cold wallet doesn't need a receive UX since
the online side handles address generation from the same xpubs.)

## Setup

1. Build for simulator/device (`xcodebuild build` or Cmd+R in Xcode).
2. Have a wallet ready — either restored from the abandon-abandon test seed or created via the keygen flow (Plan 4).
3. Tap into the wallet on the WalletsList.

## Watch-only export

1. On the WalletHome screen, tap **Export watch-only**.
2. Brief loading state, then a Form appears with "Show QR" and "Save to Files" buttons.
3. Tap **Save to Files**. A "Saved" section appears with the absolute file path `…/Documents/watch_only_<fingerprint>.json`.
4. Open the simulator/device Files app → On My iPhone → ArmoryCold. Confirm `watch_only_*.json` exists.
5. Open the file in any text editor. Confirm it's valid JSON containing keys like `xpubs`, `sp_scan_pubkey`, `sp_scan_privkey`, `addresses`.
6. Back to Export. Tap **Show QR**. Animated UR frames cycle. Confirm "Frame X / N" counter updates and the title reads "Scan with your online wallet".

## Encrypted wallet path

If the wallet has a password (e.g. created via keygen with a password set):

1. Tap **Export**. A password sheet appears.
2. Enter the password and tap **Unlock**. The screen loads normally.
3. Tap **Cancel** instead — the screen stays empty; tapping back returns to WalletHome.
4. Enter a WRONG password — confirm a clear "Incorrect password — try again." error and the sheet re-presents.

## Pass criteria

- Watch-only export produces a valid JSON file in Documents/.
- The JSON contains both `sp_scan_pubkey` AND `sp_scan_privkey` (the online side needs the privkey to monitor for incoming silent payments).
- The JSON does NOT contain `master_key` or `sp_spend_privkey` (spending keys stay on the cold device).
- Animated QR cycles smoothly at ~6 fps.
- Encrypted-wallet password sheet works, including the wrong-password retry path.
- Saved file is excluded from iCloud backup (Settings → Apple ID → iCloud → Manage Account Storage → Backups → this device → confirm Armory Cold's Documents subset doesn't include the file).
- No network activity in Xcode's Debug Navigator throughout.
