From 92788ebea410772a92a7546cfba62ddf7dc61a2a Mon Sep 17 00:00:00 2001 From: Erisu Date: Tue, 18 Nov 2025 18:28:15 +0900 Subject: [PATCH] feat!: restructured spawn method 1. Removed 'waitForDebugger' spawn param. (Moved to 'options') 2. Removed 'arch' spawn param. (Moved to 'options') 3. Added param 'options' for the spawn options. Valid Options: - waitForDebugger (boolean) - arch (string) --- simctl.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/simctl.js b/simctl.js index 017b90c..5106b0d 100644 --- a/simctl.js +++ b/simctl.js @@ -125,21 +125,21 @@ module.exports = { return spawnSync('xcrun', args) }, - spawn: function (waitForDebugger, arch, device, pathToExecutable, argv) { + spawn: function (device, pathToExecutable, argv = [], options = {}) { const args = ['simctl', 'spawn'] - if (waitForDebugger) { + if (options.waitForDebugger) { args.push('--wait-for-debugger') } - - if (arch) { - args.push(`--arch="${arch}"`) + if (options.arch) { + args.push(`--arch=${options.arch}`) } args.push(device) args.push(pathToExecutable) + args.push(...argv) - return spawnSync('xcrun', args.concat(argv)) + return spawnSync('xcrun', args) }, list: function (options) {