Skip to content

isimulator - add various other options #118

@IGPenguin

Description

@IGPenguin

Pull Request #137
Credits to Ankit Kumar Gupta's blogpost

  • xcrun simctl io booted recordVideo — type=mp4 ./test.mp4
  • xcrun simctl io booted screenshot ./screen.png
  • xcrun simctl addmedia booted ./test.mp4
  • `xcrun simctl spawn booted log stream > test.log&`; open test.log;
  • xcrun simctl terminate <pkg> (or terminate foreground app 🤞)

Some other ideas

  • xcrun simctl appinfo booted <bundle-id>
  • add simulator type and iOS version into screenshot/video filename
  • add build - build and run iOS project
  • add layout bounds enabled build
  • enhance launch - add app chooser
  • enhance uninstall - add app chooser
  • and something from the following:
xcrun simctl <command>
	getenv              Print an environment variable from a running device.
	addmedia            Add photos, live photos, videos, or contacts to the library of a device.
	install             Install an app on a device.
	uninstall           Uninstall an app from a device.
	get_app_container   Print the path of the installed app's container
	terminate           Terminate an application by identifier on a device.
	spawn               Spawn a process by executing a given executable on a device.
	pbpaste             Print the contents of the device's pasteboard to standard output.
	io                  Set up a device IO operation.
	diagnose            Collect diagnostic information and logs.
	logverbose          enable or disable verbose logging for a device

Other sources:
https://medium.com/@tci/launch-apps-in-ios-simulator-using-terminal-5f21d60b7151
https://littlebitesofcocoa.com/313-interacting-with-the-ios-simulator-using-simctl
https://nshipster.com/simctl/
https://medium.com/the-traveled-ios-developers-guide/ios-simulator-power-ups-407060863b3c
https://www.iosdev.recipes/simctl/

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedunknown solution or major effort inevitablenew featureidea for new feature

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions