Created
April 17, 2018 21:12
-
-
Save dr2050/579db399356f447f862fb6565686ffcc to your computer and use it in GitHub Desktop.
Deletes all your iOS Simulators
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
`xcrun simctl shutdown all` | |
device_lines = `xcrun simctl list`.split("\n") | |
device_lines.each do |line| | |
line.strip! | |
matches = /[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}/.match(line) | |
if matches | |
`xcrun simctl delete #{matches}` | |
puts "Deleting sim with ID #{matches}" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment