Skip to content

Commit 6bd2c72

Browse files
[eas-shared] Ensure UsbmuxClient can load binary plist pair record data from Apple devices (#257)
* [eas-shared] Ensure UsbmuxClient can load binary plist pair record data from Apple devices * [cli] Add README * Add changelog entry
1 parent b4d8e4d commit 6bd2c72

File tree

3 files changed

+185
-1
lines changed

3 files changed

+185
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
### 🐛 Bug fixes
1212

1313
- Fix "no such file" error when opening cached builds. ([#256](https://github.com/expo/orbit/pull/256) by [@gabrieldonadel](https://github.com/gabrieldonadel))
14+
- Ensure UsbmuxClient can load binary plist pair record data from Apple devices. ([#257](https://github.com/expo/orbit/pull/257) by [@gabrieldonadel](https://github.com/gabrieldonadel))
1415

1516
### 💡 Others
1617

apps/cli/src/README.md

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
# expo-orbit-cli
2+
3+
`expo-orbit-cli` is the internal command-line interface for Expo Orbit.
4+
It provides commands to manage device emulators, download builds, launch apps/updates, and more.
5+
6+
---
7+
8+
## Installation
9+
10+
> **This CLI is shipped internally with Expo Orbit.**
11+
> If you’re working locally, install dependencies and build the CLI:
12+
13+
```bash
14+
yarn install
15+
yarn build
16+
```
17+
18+
Then invoke with:
19+
20+
```bash
21+
yarn cli <command> [options]
22+
23+
# or, if you’ve set up an alias for the Orbit CLI so you can try it in projects all around your computer. Open your **.zshrc** or other config file and add:
24+
25+
```
26+
27+
alias expo-orbit-cli="/path/to/orbit/apps/cli/build/index.js"
28+
29+
```
30+
expo-orbit-cli <command> [options]
31+
```
32+
33+
---
34+
35+
## Commands
36+
37+
### download-build
38+
39+
```bash
40+
expo-orbit-cli download-build <build-url>
41+
```
42+
43+
- **Arguments**
44+
`<build-url>`
45+
: URL of the build to download.
46+
47+
- **Description**
48+
Downloads the specified build (e.g. an OTA bundle or app binary) to your machine.
49+
50+
---
51+
52+
### list-devices
53+
54+
```bash
55+
expo-orbit-cli list-devices [--platform <platform>]
56+
```
57+
58+
- **Options**
59+
`-p, --platform <string>`
60+
: Selected platform (`ios`, `android` or `all`).
61+
_Default_: `all`
62+
63+
- **Description**
64+
Lists available simulators/emulators and connected devices for the given platform.
65+
66+
---
67+
68+
### boot-device
69+
70+
```bash
71+
expo-orbit-cli boot-device --platform <platform> --id <device-id> [--no-audio]
72+
```
73+
74+
- **Options**
75+
`-p, --platform <string>`
76+
: Platform of the emulator (`ios` or `android`).
77+
`--id <string>`
78+
: UDID or name of the device to boot.
79+
`--no-audio`
80+
: (Android only) Launch the emulator with audio muted.
81+
82+
- **Description**
83+
Boots (or restarts) the specified simulator/emulator.
84+
85+
---
86+
87+
### install-and-launch
88+
89+
```bash
90+
expo-orbit-cli install-and-launch --app-path <path> --device-id <device-id>
91+
```
92+
93+
- **Options**
94+
`--app-path <string>`
95+
: Local filesystem path to the built app (`.app` or `.apk`).
96+
`--device-id <string>`
97+
: UDID or name of the target device/emulator.
98+
99+
- **Description**
100+
Installs the given app binary on the target device and immediately launches it.
101+
102+
---
103+
104+
### launch-expo-go
105+
106+
```bash
107+
expo-orbit-cli launch-expo-go <snack-url> \
108+
--platform <platform> --device-id <device-id> [--sdk-version <version>]
109+
```
110+
111+
- **Arguments**
112+
`<snack-url>`
113+
: URL of the Snack or project to open in Expo Go.
114+
115+
- **Options**
116+
`-p, --platform <string>`
117+
: Target platform (`ios` or `android`).
118+
`--device-id <string>`
119+
: UDID or name of the device/emulator.
120+
`--sdk-version <string>`
121+
: (Optional) Expo SDK version to use (e.g. `52.0.0`).
122+
123+
- **Description**
124+
Opens the given Snack URL in Expo Go on the specified device.
125+
126+
---
127+
128+
### launch-update
129+
130+
```bash
131+
expo-orbit-cli launch-update <update-url> \
132+
--platform <platform> --device-id <device-id> [--skip-install] [--force-expo-go]
133+
```
134+
135+
- **Arguments**
136+
`<update-url>`
137+
: URL of the published update (EAS Update).
138+
139+
- **Options**
140+
`-p, --platform <string>`
141+
: Target platform (`ios` or `android`).
142+
`--device-id <string>`
143+
: UDID or name of the device/emulator.
144+
`--skip-install`
145+
: Don’t reinstall the app; just apply the update.
146+
`--force-expo-go`
147+
: Always open the update via the Expo Go app (even if a standalone app is installed).
148+
149+
- **Description**
150+
Fetches and applies a published update on the device.
151+
152+
---
153+
154+
### check-tools
155+
156+
```bash
157+
expo-orbit-cli check-tools [--platform <platform>]
158+
```
159+
160+
- **Options**
161+
`-p, --platform <string>`
162+
: Platform to verify toolchain for (`ios` or `android`).
163+
164+
- **Description**
165+
Verifies that required native toolchains (Xcode command-line, Android SDKs/emulator tools) are installed.
166+
167+
---
168+
169+
### detect-ios-app-type
170+
171+
```bash
172+
expo-orbit-cli detect-ios-app-type <app-path>
173+
```
174+
175+
- **Arguments**
176+
`<app-path>`
177+
: Filesystem path to a built `.app` bundle.
178+
179+
- **Description**
180+
Inspects an iOS app bundle and reports whether it’s a simulator build, App Store build, etc.
181+
182+
---

packages/eas-shared/src/run/ios/appleDevice/client/UsbmuxdClient.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ export class UsbmuxdClient extends ServiceClient<UsbmuxProtocolClient> {
190190
const BPLIST_MAGIC = Buffer.from('bplist00');
191191
if (BPLIST_MAGIC.compare(resp.PairRecordData, 0, 8) === 0) {
192192
debug('Binary plist pair record detected.');
193-
return parsePlistBuffer(resp.PairRecordData)[0];
193+
const pairRecords = parsePlistBuffer(resp.PairRecordData);
194+
return Array.isArray(pairRecords) ? pairRecords[0] : pairRecords;
194195
} else {
195196
// TODO: use parsePlistBuffer
196197
return plist.parse(resp.PairRecordData.toString()) as any; // TODO: type guard

0 commit comments

Comments
 (0)