Skip to content

Commit 4b56bd2

Browse files
authored
feat: allow listing visionOS devices (#128)
2 parents 2a7e2c2 + 84c8504 commit 4b56bd2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/iphone-simulator-xcode-simctl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ export class XCodeSimctlSimulator
367367

368368
if (isSimulatorAppRunning) {
369369
// In case user closes simulator window but simulator app is still alive
370-
if (!haveBootedDevices) {
370+
if (!haveBootedDevices || !device) {
371371
device = await this.getDeviceToRun(options);
372372
}
373373
this.simctl.boot(device.id);

lib/simctl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export class Simctl implements ISimctl {
8888
// so, get the `-- iOS X.X --` line to find the sdk (X.X)
8989
// and the rest of the listing in order to later find the devices
9090

91-
let deviceSectionRegex = /-- (iOS) (.+) --(\n .+)*/gm;
91+
let deviceSectionRegex = /-- (iOS|visionOS) (.+) --(\n .+)*/gm;
9292
let match = deviceSectionRegex.exec(rawDevices);
9393

9494
let matches: any[] = [];

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ios-sim-portable",
3-
"version": "4.4.0",
3+
"version": "4.4.1-vision.0",
44
"description": "",
55
"main": "./lib/ios-sim.js",
66
"files": [

0 commit comments

Comments
 (0)