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

Add wrapper over terminate and getAppContainer calls for simctl #30

Merged
merged 3 commits into from Feb 7, 2017

Conversation

mykola-mokhnach
Copy link
Contributor

This will be needed to finish new simulator startup flow PR for appium-xcuitest-driver

Copy link
Contributor

@imurchie imurchie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@mykola-mokhnach mykola-mokhnach changed the title Add wrapper over terminate call for simctl Add wrapper over terminate and getAppContainer calls for simctl Feb 7, 2017
@mykola-mokhnach
Copy link
Contributor Author

@imurchie Can you please check again - I've added one more call, that might be necessary for us

@imurchie
Copy link
Contributor

imurchie commented Feb 7, 2017

What does the get_app_container call do? Is it possible to add some tests for these?

@mykola-mokhnach
Copy link
Contributor Author

mykola-mokhnach commented Feb 7, 2017

@imurchie this shows a path to application bundle installed on simulator:

$> xcrun simctl get_app_container booted com.apple.mobilesafari
/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 10.0.simruntime/Contents/Resources/RuntimeRoot/Applications/MobileSafari.app

so one can verify whether an app with given bundleId is installed or not on simulator using this tool.

@imurchie
Copy link
Contributor

imurchie commented Feb 7, 2017

Ah. Ok. And what does "terminate" do? Looking at it's usage it seems like it doesn't just stop an app running?

@mykola-mokhnach
Copy link
Contributor Author

Running

$> xcrun simctl terminate booted com.apple.mobilesafari

will for example terminate Safari if it is currently running (or will do nothing if not).

But get_app_container will return non-zero return code if there is no such app with given bundleId installed

@imurchie imurchie merged commit 1c280dd into appium:master Feb 7, 2017
@imurchie
Copy link
Contributor

imurchie commented Feb 7, 2017

Published in node-simctl@3.5.0.

Copy link
Member

@jlipps jlipps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@mykola-mokhnach mykola-mokhnach deleted the terminate_call branch February 8, 2017 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants