Install iOS Simulator
iOS Simulator is supported only on macOS. Windows and Linux cannot install or run Xcode Simulator, so these two systems cannot serve as execution environments for iOS mobile exploration.
UDocs uses the Simulator already installed and available in the local Xcode. First install the full Xcode, prepare an iOS Runtime, create and start at least one simulator, then return to "Tools Installation → Exploration Tools" in UDocs and click "Refresh Detection".
The recommended configuration is iPhone 18 Pro and iOS 27.0; if your current Xcode only provides other Runtimes or device types, you can also use the existing local configuration.
1. Install the full Xcode
If only Command Line Tools is installed, xcrun simctl is unavailable; you must use the full Xcode.
Install from the Xcode page on the Mac App Store, or run the following in Terminal:
open "macappstore://apps.apple.com/app/xcode/id497799835"After opening Xcode for the first time, accept the license agreement and wait for the required components to finish installing.
2. Switch and initialize the command-line tools
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunchAfter that, check the current path:
xcode-select -pThe output should point to /Applications/Xcode.app/Contents/Developer.
3. Install an iOS Runtime
Open Xcode's Settings → Components, or install the target iOS Runtime in Window → Devices and Simulators. You can also use commands first to confirm the runtimes and device types already available locally:
xcrun simctl list runtimes
xcrun simctl list devicetypesRecommended searches:
xcrun simctl list devicetypes | grep "iPhone 18 Pro"
xcrun simctl list runtimes | grep "iOS 27"If these two versions are not available locally, simply choose any installed iOS Runtime and iPhone device type.
4. Create and start a simulator
SIMULATOR_UDID=$(xcrun simctl create "DeepTest iPhone 18 Pro" \
com.apple.CoreSimulator.SimDeviceType.iPhone-18-Pro \
com.apple.CoreSimulator.SimRuntime.iOS-27-0)
xcrun simctl boot "$SIMULATOR_UDID"
open -a Simulator
xcrun simctl list devices bootedxcrun simctl list devices booted should show the device you just started. You can also create and start a simulator in Xcode's Window → Devices and Simulators.
If the create command says the device type or runtime does not exist, replace iPhone-18-Pro and iOS-27-0 with identifiers that actually exist in simctl list.
5. Return to UDocs to check
- Keep Simulator running.
- Open "Tools Installation" on the left side of UDocs and find "Exploration Tools".
- Click "Refresh Detection" and confirm that the iOS Simulator entry can detect the Xcode environment.
- Open the document creation page for the iOS project, and for the node select "More Actions → UI Exploration".
- The started Simulator should be visible in the Device ID drop-down list; if the list is empty, run detection again or directly enter the UDID shown by
xcrun simctl list devices booted.
The mobile simulator is optional and does not block Web project exploration. Only automated exploration of iOS projects uses it.
FAQ
- The error
xcrun: error: unable to find utility "simctl"is displayed: This means the current setup is not the full Xcode. Checkxcode-select -pand runsudo xcode-select -sagain. - The simulator list is empty: Install an iOS Runtime in Xcode first, or use
xcrun simctl list runtimesto confirm that the runtime has finished downloading. - UDocs does not detect a device: Confirm that Simulator is running and reopen the UI Exploration configuration page; you can also enter the UDID directly.
- The create command fails: The device type or runtime identifier is inconsistent with the current Xcode version. Use the actual identifier output by
simctl listinstead.