---
name: fish-pocket-phone-control-setup
description: Set up iCTRL on the user's iPhone so the agent inside the Fish Pocket app can operate other apps. Use when the user asks you (an agent on their computer) to install or repair this setup, or to fix SideStore pairing-file errors on the way.
---

# Set up iCTRL for Fish Pocket

You are an agent on the user's computer. Goal: the iOS app **Fish Pocket** shows **Running** under 操控手机 (Phone Control) in its Explore tab (in the sidebar before iOS 18). Then the agent inside Fish Pocket can tap, type and read other apps through [iCTRL](https://github.com/OpenMinis/iCTRL), an open-source XCUITest service that listens on `127.0.0.1:8200` on the phone only.

Human guide with the same steps: https://fish.deepseek1024.com/phone-control/ (also `/en/`, `/ja/`, `/ko/`).

Verified on 2026-11-15 with iOS 27.2.1, SideStore nightly 0.7.0-20261027, iLoader 2.4.1, LocalDevVPN 1.3.0, iCTRL 1.98.16. These tools change quickly: if a screen or error differs from this page, trust what you see, check the tool's current docs, and tell the user.

## Ground rules

- **The user does anything that needs their Apple ID, passcode, Face ID or a tap on the phone.** Never ask for, type or store their Apple ID password or a verification code. Tell them exactly what to tap, then wait for them.
- **Pairing files hold private keys.** Never print their contents, never upload or paste them anywhere, delete your temporary copies when done.
- **Never turn on iCTRL's remote access or nearby discovery.** Fish Pocket only needs the service on the phone itself.
- Ask before installing anything on the computer, and name what and from where.

## 0. Check before starting

- iPhone on **iOS 17.4 or later**. Ask the user, or read it: `xcrun devicectl list devices` (Mac with Xcode), `ideviceinfo -k ProductVersion` (libimobiledevice) or `pymobiledevice3 lockdown info`.
- A USB cable between phone and computer, both on the same Wi-Fi with internet.
- Fish Pocket installed from the App Store.
- If iCTRL is already installed, skip to step 6 and only fix what is broken.

## 1. Developer Mode and LocalDevVPN (user, on the phone)

1. Settings › Privacy & Security › Developer Mode: on. The phone restarts. (If the switch is missing, it appears after step 3.)
2. Install **LocalDevVPN** from the App Store, open it, tap Connect, allow the VPN configuration.

## 2. iLoader (computer)

Install [iLoader](https://iloader.app) for the user's OS (macOS: the universal `.dmg` from its GitHub releases, Developer ID signed and notarized; Windows needs iTunes or Apple Devices first; Linux needs `usbmuxd`). Ask first.

## 3. SideStore (user, guided by you)

1. Phone on the cable; the user taps Trust and enters the passcode.
2. In iLoader the user signs in with their Apple ID (a free one is fine), selects the iPhone and clicks **SideStore (Nightly)** on iOS 26.4 or later, **SideStore (Stable)** below that. iLoader installs SideStore and places a pairing file into it.
3. On the phone: Settings › General › VPN & Device Management › trust the Apple ID. On iOS 18+ this restarts the phone.
4. With LocalDevVPN connected, the user opens SideStore and signs in with the same Apple ID.

## 4. Make SideStore load its pairing file

Seen with SideStore nightly 0.7.0-20261027 on iOS 27; may be fixed later. Symptoms: "Device Registration Error", "Pairing Required: No valid pairing file has been loaded", or Settings › Pairing File Management shows **Active Protocol: unknown**.

1. The user opens SideStore › Settings › Pairing File Management, **long-presses** "Remote Pairing File" and taps **Set as Preferred**.
2. A fresh SideStore ignores files placed by iLoader until one is imported by hand. The user long-presses "Remote Pairing File" › **Import / Replace File**.
3. If the import says **"The pairing file format is ambiguous"**: iLoader's file holds both Remote Pairing and Lockdown credentials, and SideStore's import refuses that. Make a copy with only the Remote Pairing keys:
   - Get the file. Mac with Xcode: `xcrun devicectl device info apps --device <udid> --include-all-apps | grep -i sidestore` for the bundle id, then `xcrun devicectl device copy from --device <udid> --domain-type appDataContainer --domain-identifier <sidestore-bundle-id> --source Documents/PairingFile_RemoteRP.plist --destination <tmp>/rp.plist`. Elsewhere: the user shares `On My iPhone › SideStore › PairingFile_RemoteRP.plist` from the Files app to the computer.
   - Keep only four keys, as an XML plist:
     ```python
     import plistlib, sys
     src, dst = sys.argv[1], sys.argv[2]
     d = plistlib.load(open(src, "rb"))
     keep = {k: d[k] for k in ("public_key", "private_key", "identifier", "alt_irk") if k in d}
     assert {"public_key", "private_key", "identifier"} <= keep.keys(), "not a RemotePairing record"
     open(dst, "wb").write(plistlib.dumps(keep, fmt=plistlib.FMT_XML))
     print("wrote", dst, sorted(keep))
     ```
   - Put it back as `RP-only.plist` next to the original (Mac: `xcrun devicectl device copy to … --source <tmp>/RP-only.plist --destination Documents/RP-only.plist`; elsewhere AirDrop or Files), and have the user import **RP-only.plist**, not the original.
4. The user force-quits and reopens SideStore. Active Protocol must now read `rppairing`.
5. In My Apps the user taps the **7 DAYS** counter next to SideStore (accept "revoke/create certificate" prompts). It returns to the Home Screen with a notification when it worked.

## 5. iCTRL (computer + user)

1. Download the two packages from the latest release: `gh release download -R OpenMinis/iCTRL -p 'iCTRL.ipa' -p 'iCTRLUITests-Runner.ipa'` (or from https://github.com/OpenMinis/iCTRL/releases).
2. Get them onto the phone: Mac with Xcode, copy both into SideStore's `Documents/` with `devicectl device copy to`; otherwise AirDrop or Files.
3. The user installs each in SideStore › My Apps › **+**, runner first. A free Apple ID allows 3 sideloaded apps: SideStore, iCTRL and the runner use all of them.

## 6. Start and check

1. The user opens iCTRL. The developer disk image must show **Mounted**. If not, with LocalDevVPN connected, tap mount (the first time it downloads the image). From iOS 26.4 it stays mounted across restarts until the next system update; on 17.4–26.3 it must be mounted again after every restart.
2. The user taps **启动服务 / Start Server**. The screen jumps to the runner and back; iOS shows "Automation Running" at the top.
3. In Fish Pocket: 操控手机 (Phone Control) in the Explore tab (in the sidebar before iOS 18) should read **运行中 / Running**. That page can also start and stop the service.
4. The user can switch back to their usual VPN now. LocalDevVPN is only needed to mount the image and for SideStore to install or refresh.
5. The first time Fish Pocket's agent connects, iCTRL posts a pairing notification: long-press it and tap 允许 / Allow.

You cannot reach the service from the computer (it answers on the phone only). Ask the user to send a test message in Fish Pocket, for example: 打开计算器算 12×34，然后回到这里告诉我结果.

## Troubleshooting

- **Runner will not open / Start does nothing:** the 7-day free signature expired. LocalDevVPN on, SideStore › My Apps › tap the day counters of iCTRL and the runner.
- **Refresh fails while locked (iOS 27.2, Shortcuts automation):** refresh by hand with the phone unlocked.
- **Stop Server jumps to the runner and back, shows "停止 iCTRL?" and keeps running:** by design. Long-press that notification and tap Stop.
- **Agent asks to pair again after reinstalling iCTRL:** expected; allow once more.
- **Only one VPN at a time:** iOS limit. LocalDevVPN for mounting and SideStore; anything else afterwards (tested with Shadowrocket).
