davelyon / simulator Goto Github PK
View Code? Open in Web Editor NEWA nicer wrapper for simctl
License: MIT License
A nicer wrapper for simctl
License: MIT License
Make a proper help command that instructs users on how to use the tool.
Maybe make it something you could install via Homebrew?
To help with keeping development environments consistent for developers on a team, it would be nice to be able to script the creation of a set of simulators. Perhaps that would look like:
$ simulator import project/.simulators
Importing list of expected simulators...
Creating iPhone 4s Simulator [iPhone 4s] [iOS 7.1]
Found iPhone 5 Simulator [iPhone 5] [iOS 7.1]
...
$ simulator export project/.simulators
Exporting all simulators
The file might look like:
iPhone 4s Simulator,iPhone-4s,iOS-7-1
iPhone 5 Simulator,iPhone-5s,iOS-7-1
ZTestSimulator-8-2,iPhone-6,iOS-8-2
ZTestSimulator-7-1,iPhone-5s,iOS-7-1
It might be simplest to use CSV, with columns: Name, Device, Runtime -- though it could be nicer to read if it were more concise or grouped by SDK somehow.
The idea for this project started from trying to reliably script "resetting" a simulator for testing purposes. Some issues exist however:
Some other concerns:
Stopping a "booted" simulator may require a hard killall iOS Simulator
to be 'reliable' which may lead to other issues in the long term. In a CI environment, if we can assume that only one task can run with the simulator at a time, these are easier to handle (assume that we're the one task).
I'm considering something like:
$ simulator reset "ZTestSimulator"
Unable to reset simulator while booted. (Exit 1)
$ simulator reset -f "ZTestSimulator"
Stopping simulator ZTestSimulator
Reset ZTestSimulator "4183E129-01F2-47C4-941C-E7DE6AB69F5F"
# No simulator exists by that name/device/sdk
$ simulator prepare "ZTestSimulator" iPhone-5s iOS-8-2
Creating ZTestSimulator [iPhone 5S] [iOS 8.2]
# Simulator exists
$ simulator prepare "ZTestSimulator" iPhone-5s iOS-8-2
Resetting ZTestSimulator [iPhone 5S] [iOS 8.2]
# Simulator exists and is booted
$ simulator prepare "ZTestSimulator" iPhone-5s iOS-8-2
Unable to reset ZTestSimulator [iPhone 5S] [iOS 8.2] (Exit 1)
$ simulator prepare -f "ZTestSimulator" iPhone-5s iOS-8-2
Stopping simulator ZTestSimulator
Resetting ZTestSimulator [iPhone 5S] [iOS 8.2]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.