Skip to content

Instantly share code, notes, and snippets.

Miguel Cabeça cabeca

Block or report user

Report or block cabeca

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cabeca
cabeca / simulator_populator_xcode7
Last active Apr 21, 2019
This script removes and recreates all simulators in Xcode 7.
View simulator_populator_xcode7
#!/usr/bin/env ruby
require 'JSON'
device_types = JSON.parse `xcrun simctl list -j devicetypes`
runtimes = JSON.parse `xcrun simctl list -j runtimes`
devices = JSON.parse `xcrun simctl list -j devices`
devices['devices'].each do |runtime, runtime_devices|
runtime_devices.each do |device|
@cabeca
cabeca / simulator_populator
Created Sep 23, 2014
This script removes and recreates all simulators in Xcode 6.
View simulator_populator
#!/usr/bin/env ruby
device_types_output = `xcrun simctl list devicetypes`
device_types = device_types_output.scan /(.*) \((.*)\)/
runtimes_output = `xcrun simctl list runtimes`
runtimes = runtimes_output.scan /(.*) \(.*\) \((com.apple[^)]+)\)$/
devices_output = `xcrun simctl list devices`
devices = devices_output.scan /\s\s\s\s(.*) \(([^)]+)\) (.*)/
You can’t perform that action at this time.