{"action":"created","issue":{"url":"https://api.github.com/repos/fastlane/snapshot/issues/351","repository_url":"https://api.github.com/repos/fastlane/snapshot","labels_url":"https://api.github.com/repos/fastlane/snapshot/issues/351/labels{/name}","comments_url":"https://api.github.com/repos/fastlane/snapshot/issues/351/comments","events_url":"https://api.github.com/repos/fastlane/snapshot/issues/351/events","html_url":"https://github.com/fastlane/snapshot/issues/351","id":122342974,"number":351,"title":"Erase or delete and restore existing simulators","user":{"login":"ZevEisenberg","id":464574,"avatar_url":"https://avatars.githubusercontent.com/u/464574?v=3","gravatar_id":"","url":"https://api.github.com/users/ZevEisenberg","html_url":"https://github.com/ZevEisenberg","followers_url":"https://api.github.com/users/ZevEisenberg/followers","following_url":"https://api.github.com/users/ZevEisenberg/following{/other_user}","gists_url":"https://api.github.com/users/ZevEisenberg/gists{/gist_id}","starred_url":"https://api.github.com/users/ZevEisenberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZevEisenberg/subscriptions","organizations_url":"https://api.github.com/users/ZevEisenberg/orgs","repos_url":"https://api.github.com/users/ZevEisenberg/repos","events_url":"https://api.github.com/users/ZevEisenberg/events{/privacy}","received_events_url":"https://api.github.com/users/ZevEisenberg/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/fastlane/snapshot/labels/migrated","name":"migrated","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-15T19:11:31Z","updated_at":"2016-03-07T23:22:37Z","closed_at":"2015-12-15T20:53:27Z","body":"I usually work with a subset of the normal simulators, or maybe with, e.g., several sizes of iPhones running iOS 8.4 and 9.2. I sometimes want to blow away the contents of my simulators, but I don't want to have to re-delete the ones I don't want, and recreate the nonstandard ones I do want. What I'd like is a way to programmatically choose *Simulator* → *Reset Content and Settings…* for each simulator that is currently enabled.\r\n\r\nHere's how I currently do it:\r\n\r\n```sh\r\nfunction resetAllSimulators () {\r\n\tosascript -e 'tell application \"iOS Simulator\" to quit'\r\n\tosascript -e 'tell application \"Simulator\" to quit'\r\n\txcrun simctl list devices | grep -v '^[-=]' | cut -d \"(\" -f2 | cut -d \")\" -f1 | xargs -I {} xcrun simctl erase \"{}\"\r\n}\r\n```\r\n\r\nBut it seems like it would make perfect sense for this to be built into snapshot."},"comment":{"url":"https://api.github.com/repos/fastlane/snapshot/issues/comments/193501371","html_url":"https://github.com/fastlane/snapshot/issues/351#issuecomment-193501371","issue_url":"https://api.github.com/repos/fastlane/snapshot/issues/351","id":193501371,"user":{"login":"fastlanebot","id":17711343,"avatar_url":"https://avatars.githubusercontent.com/u/17711343?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlanebot","html_url":"https://github.com/fastlanebot","followers_url":"https://api.github.com/users/fastlanebot/followers","following_url":"https://api.github.com/users/fastlanebot/following{/other_user}","gists_url":"https://api.github.com/users/fastlanebot/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlanebot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlanebot/subscriptions","organizations_url":"https://api.github.com/users/fastlanebot/orgs","repos_url":"https://api.github.com/users/fastlanebot/repos","events_url":"https://api.github.com/users/fastlanebot/events{/privacy}","received_events_url":"https://api.github.com/users/fastlanebot/received_events","type":"User","site_admin":false},"created_at":"2016-03-07T23:22:37Z","updated_at":"2016-03-07T23:22:37Z","body":"This issue was migrated to https://github.com/fastlane/fastlane/issues/2525. Please post all further comments there.\n\n`fastlane` is now a mono repo, you can read more about the change in our [blog post](https://krausefx.com/blog/our-goal-to-unify-fastlane-tools). All tools are now available in the [fastlane main repo](https://github.com/fastlane/fastlane) :rocket:"}}