Skip to content

Use simctl (Xcode 6) #92

@shazron

Description

@shazron

$ xcrun simctl
WARNING: The simctl interface is not stable and is likely to change prior to release.
Usage: simctl [--noxpc] [--set ] ... | help [subcommand]
Command line utility to control the iOS Simulator

Subcommands:
create Create a new device.
delete Delete a device.
erase Erase a device's contents and settings.
boot Boot a device.
shutdown Shutdown a device.
rename Rename a device.
getenv Print an environment variable from a running device.
openurl Open a URL in a given SimDevice
addphoto Add photo to the photo library of a given SimDevice
launch Launch an application by identifier
spawn Spawn a process in the simulator
list List available sessions, devices, or runtimes.
help Prints the usage for a given subcommand.

Activity

shazron

shazron commented on Jun 20, 2014

@shazron
Author

I haven't investigated this fully, but it may not replace all ios-sim features.

shazron

shazron commented on Sep 22, 2014

@shazron
Author

simctl does not actually launch the simulator with a certain device. For that you need to use "instruments"

this will list available devices

$ xcrun instruments -s devices

this will launch the simulator with the appropriate device

$ xcrun instruments -w "iPhone 6 Plus"

Plan:

  1. use instruments to launch the Simulator with the specific device
  2. use simctl to install the app
  3. use simctl to launch the app
    Create a convenience script that wraps this all up.
shazron

shazron commented on Sep 22, 2014

@shazron
Author

This feature should be in a 4.x branch since it completely overhauls the existing code.

shazron

shazron commented on Sep 22, 2014

@shazron
Author

This should just be a node.js script

shazron

shazron commented on Sep 23, 2014

@shazron
Author

4.x branch created.

gurubarancse

gurubarancse commented on Oct 13, 2014

@gurubarancse

I tried to write script but unfortunately could not get the stdout or stderr to work. Any ideas?

shazron

shazron commented on Nov 25, 2014

@shazron
Author

I've started on the 4.x branch: https://github.com/phonegap/ios-sim/tree/4.x
The commands are stubbed out for now. It uses the simctl npm package that I wrote.

@gurubarancse I haven't gotten to that part yet, not sure.

shazron

shazron commented on Nov 25, 2014

@shazron
Author

We might have to watch the log: http://stackoverflow.com/a/25822966/219684

shazron

shazron commented on Nov 25, 2014

@shazron
Author

tail package could be used in combination with the log path: https://www.npmjs.org/package/tail

shazron

shazron commented on May 14, 2015

@shazron
Author

Changes are logged in the "Usage" in the README as development progresses: https://github.com/phonegap/ios-sim/tree/4.x#usage

modified the milestone: ios-sim 4.1.0 on May 15, 2015
taren7

taren7 commented on May 28, 2015

@taren7

I am trying to use simctl to erase content and settings. It gives me an error saying
"An error was encountered processing the command (code=146):
Unable to erase contents and settings in current state: Booted"

Any idea how to fix this?

shazron

shazron commented on May 28, 2015

@shazron
Author

Are you using the simctl node module or using simctl directly? If it's an issue for the node module, file an issue here instead: https://github.com/phonegap/simctl/issues

taren7

taren7 commented on May 28, 2015

@taren7

I am using simctl directly
On May 28, 2015 11:51 PM, "Shazron Abdullah" notifications@github.com
wrote:

Are you using the simctl node module or using simctl directly? If it's an
issue for the node module, file an issue here instead:
https://github.com/phonegap/simctl/issues


Reply to this email directly or view it on GitHub.

shazron

shazron commented on May 28, 2015

@shazron
Author

Then your issue is off-topic for this thread or phonegap/simctl. If I knew the answer I would reply but I don't unfortunately.

modified the milestones: 5.0.3, 5.1.0 on Oct 12, 2015
modified the milestone: 5.2.0 on Jun 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @shazron@gurubarancse@taren7

        Issue actions

          Use simctl (Xcode 6) · Issue #92 · ios-control/ios-sim