Questions tagged [simctl]

Introduced in Xcode 6 (by Apple), simctl is a tool that allows you to create, boot, launch and then shutdown and destroy iOS simulators on the fly, and provides commands to install and launch specific apps.

Introduced in Xcode 6 (by Apple), simctl is a tool that allows you to create, boot, launch and then shutdown and destroy iOS simulators on the fly, and provides commands to install and launch specific apps.

If you ever used Genymotion you might have created Android simulators using VirtualBox command line utility, Apple works towards the same flexibility with simctl.

In context of this article, to see a list of available devices, run this command

xcrun simctl list

You will get the list of device types, runtimes and devices. Device types and runtimes will be handy if you need to create new simulators. You can tell simctl to filter output, for example, list devices only

xcrun simctl list devices

Source

43 questions
3
votes
1 answer

Is it possible to interact with cloned iOS simulators via xcrun simctl?

When I'm running UI tests in parallel on multiple simulators, the cloned simulators appear to be totally invisible to xcrun simctl. When running xcrun simctl list, the source simulator appears, but is in a "shutdown" state: 4 Inch Snapshots - en-US…
Chris Vasselli
  • 13,064
  • 4
  • 46
  • 49
3
votes
0 answers

simctl recordVideo - problem streaming the video

I want to be able to stream the booted simulator's screen to a video output. I know that simctl has a recordVideo option that supports streaming. I've tried the following command: xcrun simctl io DEVICE_ID recordVideo --type=fmp4…
Chris
  • 7,830
  • 6
  • 38
  • 72
3
votes
0 answers

how to use xcrun simctl io to pipe and record an iOS audio stream

My iOS app writes a stereo audio stream into a circular buffer at 44.1KHz and outputs successfully to either simulator or iOS device. I want to capture the audio stream while the app is running in Xcode and do it without altering the code or…
Greg
  • 1,750
  • 2
  • 29
  • 56
3
votes
1 answer

How to boot simulator in headless mode or without window

In android there is a command to boot up a sim without a head or window which takes up significantly less ram e.g. emulator -avd Pixel2Four_API_27 -no-window -no-audio -no-snapshot-load Is there such a mode for iOS sims? Thanks
the_prole
  • 8,275
  • 16
  • 78
  • 163
2
votes
0 answers

How to send a touch event to iOS simulator via command line?

On Android we have adb commands to send touch events adb shell input tap x y send touch events to a device via adb . How do we do the same for iOS?
Yahoo
  • 4,093
  • 17
  • 59
  • 85
2
votes
1 answer

Ignoring mask while recording simulator screen

I'm trying to record a video of the simulator screen using the following command: xcrun simctl io booted recordVideo --mask=ignored ~/Desktop/footage.mp4 As you can see, I specified the value ignored for the mask parameter because I want to omit…
Vin Gazoil
  • 1,942
  • 2
  • 20
  • 24
2
votes
1 answer

Unable to execute /usr/bin/xcrun simctl install... when deploying a Delphi app on iOS simulator

I'm trying to set up an environment for releasing iOS apps. On my Windows PC I use RAD Studio 10.2 Update 3 and I created a new Delphi app from one of the samples. On my Mac I have XCode 8.2, iOS 10.0 Simulator, PAServer 19.0 (running). In RAD…
bluish
  • 26,356
  • 27
  • 122
  • 180
2
votes
2 answers

simctl + xcodebuild changing simulator state

I'm trying to automate the functional testing I have in my project. For this, I use Jenkins and run the test tasks using the post-receive git hook. The job is properly invoked, but before the tests are run, I need to erase the simulators in order to…
lawicko
  • 7,246
  • 3
  • 37
  • 49
1
vote
0 answers

"xcrun simctl get_app_container" with group identifier not working

it says I can use group identifier to get exactly the group I want: ➜ ~ xcrun simctl get_app_container booted Print the path of the installed app's container Usage: simctl get_app_container [] container …
Alan Zhang
  • 121
  • 7
1
vote
1 answer

Change status bar of simulator clones for UI tests

When enabling parallel testing in the ui test scheme, Xcode automatically spawns several clones of the simulator that is used for the tests. Additionally my workflow takes screenshots while testing. I know that I have to use the command xcrun simctl…
ProtocolGuy
  • 144
  • 8
1
vote
1 answer

How to retrieve the ios device screen resolution from the simctl command line

I'm looking for a way to retrieve via the xcrun simctl command line the screen resolution of the devices. I'v tried to list device types with xcrun simctl list -j devicetypes but unfortunately the resolution is not stored there... Any idea?
Zaphod
  • 6,758
  • 3
  • 40
  • 60
1
vote
0 answers

Proper way to reinstall iOS app between XCTest runs (via simctl)

When running UI test suite I need to reinstall the app between tests. It was going well with simctl uninstall booted #appId until XCode 10. Now after the app has been uninstalled the next test fails with: This app could not be installed at this…
brigadir
  • 6,874
  • 6
  • 46
  • 81
1
vote
0 answers

simctl | fbsimctl : Simulator becomes unresponsive if booted after shutdown command

I'm trying to achieve some automation for iOS simulators. I'm facing a strange issue that I'm not able to understand. Precisely following is my scenario: I create a simulator using command: xcrun simctl create "iPhone 8 Plus" I rename my newly…
Asad Javed
  • 273
  • 4
  • 17
1
vote
1 answer

Simulator App Preview Video pixelated

I'm using the simulator to generate an App Store Preview video with the following command: xcrun simctl io booted recordVideo ~/Desktop/test.mp4 It generates a video, but I get a lot of weird artifacts when I play the video. If I pop it into iMovie,…
Georg Kitz
  • 111
  • 1
  • 9
1
vote
1 answer

Can't install .app on simulator via command line

I'm using appium for ios test automation. Lately, I get an error when installing an .app on a simulator. I could reproduce that locally. Command line execution, that fails: xcrun simctl install DEVICE_ID /full/path/to/app Error message: An error…
Pascal
  • 358
  • 2
  • 13