The `simctl` library provides a Node.js-based programmatic interface for interacting with Apple's `simctl` command-line utility, which manages iOS Simulators on macOS. It enables developers to automate tasks such as listing available devices, booting simulators, installing and launching applications, and interacting with device settings directly from JavaScript or TypeScript code. The current stable version is 3.0.0, which introduced significant breaking changes related to output handling and method signatures. The project's release cadence is driven by updates to Xcode and internal improvements, rather than a fixed schedule. `simctl` is designed for Xcode 8 or greater and Node.js 14.17.0 or greater, acting as a foundational component for other iOS development tools like `ios-sim` by abstracting complex `xcrun simctl` commands into a more accessible API.
npm install simctlVerified import paths — ran on the pinned version, not inferred.
This quickstart code demonstrates how to use the `list` function from `simctl` to asynchronously retrieve and display information about all available iOS Simulator devices, runtimes, and device types configured on the macOS system.
Update any code relying on `Buffer` operations or raw binary data from `simctl` method outputs to handle string input directly. Parse string output as needed.
Refer to the official documentation or source code for the correct `spawn` method signature and adjust calls accordingly.
If a fresh simulator instance is required, explicitly use `shutdown` or `erase` commands before `start` to ensure the desired state, or adjust testing/development workflows to account for simulator re-use.
Ensure your development environment meets the minimum Xcode and Node.js version requirements. Upgrade Xcode via the Mac App Store or developer portal, and Node.js using `nvm` or a similar tool.
Remove `.toString()` calls from the output of `simctl` methods, as the output is already a UTF-8 string.
Verify Xcode is installed and up-to-date (Xcode 8+). Ensure `xcode-select --install` has been run for command line tools. Check if `xcrun simctl` works from the terminal.
Ensure `import { spawn } from 'simctl';` is used. Review the library's documentation for the correct `spawn` method signature in `simctl` v3.0.0+ and adjust your code accordingly.No dependency data recorded yet.