# iOS Cold Wallet — Plan 3 Smoke Test

Two paths: Files-import (simulator-runnable) and QR-scan (real-device only).

## Setup

1. Build for the iPhone 17 simulator (`xcodebuild ... build` or Cmd+R in Xcode).
2. Run the app.
3. Restore the abandon-abandon test wallet (12 words). Tap into the wallet.

## Path A: Files import + QR display (simulator-friendly)

1. On the desktop, run:
   ```bash
   python3 -m cli.offline_cli --wallet-id 73c5da0a sign tests/fixtures/test.psbt --no-finalize --yes -o /tmp/test_unsigned.psbt
   ```
   Or build a small PSBT however you like — base64 in `/tmp/test_unsigned.psbt`.
2. Drag `/tmp/test_unsigned.psbt` into the simulator window (Files app saves it to On My iPhone).
3. In Armory Cold, tap **Sign a transaction → Import from Files**. Pick the PSBT.
4. Review screen shows the recipient and fee. Tap **Sign**.
5. On a clear (un-encrypted) wallet the signature happens in ~70 s on simulator (pure-Python secp256k1).
6. Signed screen appears. Tap **Show QR**. Confirm the animated QR cycles through frames.
7. Go back. Tap **Save to Files**. Confirm a saved path is displayed in the form.
8. Open the simulator's Files app → On My iPhone → ArmoryCold. Confirm `signed_*.psbt` exists.

## Path B: QR round-trip (real device only)

Requires a real iPhone signed with a personal development certificate.

1. On the desktop, run a small script that animates a UR QR for your unsigned PSBT — use `transfer/qr_ur.py::encode_psbt` and any QR-rendering library, then animate the strings at 6 fps in a browser or terminal.
2. In Armory Cold, tap **Sign a transaction → Scan QR**. Grant camera permission.
3. Point the device at the desktop's screen. Watch the progress text count `Scanned N / M frames` until complete.
4. Review and Sign as in Path A.
5. Signed screen → Show QR. On the desktop, scan the device's screen with a webcam-driven UR decoder (when Plan 3 ships, the desktop's online build will gain this — for now use any third-party UR scanner).

## Pass criteria

- App launches without crash.
- Files import flow completes through to a saved `signed_*.psbt`.
- Show QR animates without stutter.
- (Real device only) Camera scan reassembles a multi-frame PSBT correctly.
- No network requests appear in Xcode's Debug Navigator throughout.
