Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use simctl (Xcode 6) #92

Closed
shazron opened this issue Jun 20, 2014 · 14 comments
Closed

Use simctl (Xcode 6) #92

shazron opened this issue Jun 20, 2014 · 14 comments
Labels

Comments

@shazron
Copy link

shazron commented Jun 20, 2014

$ 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.

@shazron
Copy link
Author

shazron commented Jun 20, 2014

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

@shazron
Copy link
Author

shazron commented Sep 22, 2014

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
Copy link
Author

shazron commented Sep 22, 2014

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

@shazron
Copy link
Author

shazron commented Sep 22, 2014

This should just be a node.js script

@shazron
Copy link
Author

shazron commented Sep 23, 2014

4.x branch created.

@gurubarancse
Copy link

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

@shazron
Copy link
Author

shazron commented Nov 25, 2014

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 added the 4.x label Nov 25, 2014
@shazron
Copy link
Author

shazron commented Nov 25, 2014

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

@shazron
Copy link
Author

shazron commented Nov 25, 2014

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

@shazron
Copy link
Author

shazron commented May 14, 2015

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

@shazron shazron modified the milestones: ios-sim 4.1.0, ios-sim 4.2.0 May 15, 2015
@taren7
Copy link

taren7 commented May 28, 2015

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
Copy link
Author

shazron commented May 28, 2015

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
Copy link

taren7 commented May 28, 2015

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
Copy link
Author

shazron commented May 28, 2015

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.

@shazron shazron modified the milestones: 5.0.3, 5.1.0 Oct 12, 2015
@shazron shazron closed this as completed Oct 12, 2015
@shazron shazron modified the milestone: 5.2.0 Jun 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants