Skip to content

Instantly share code, notes, and snippets.

@jbender
Created February 23, 2016 19:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbender/5e44fda4b7ae4a6349e3 to your computer and use it in GitHub Desktop.
Save jbender/5e44fda4b7ae4a6349e3 to your computer and use it in GitHub Desktop.
RubyMotion simulate all OS/device combos
{
:iphone_4 => 'iPhone 4s',
:iphone_5 => 'iPhone 5',
:iphone_6 => 'iPhone 6',
:iphone_6_plus => 'iPhone 6 Plus',
:ipad => 'iPad Retina',
:ipad_air => 'iPad Air'
}.each do |rake_task, device|
default_task = "bundle exec rake device_name=\"#{device}\""
desc "Run simulator on #{device}"
task(rake_task) { exec default_task }
namespace(rake_task) do
%w(8_1 8_2 8_3 8_4 9_0 9_1 9_2).each do |sdk|
dotpoint_sdk = sdk.tr('_', '.')
desc "Run simulator on an #{device} running iOS #{dotpoint_sdk}"
task(sdk) { exec "#{default_task} target=#{dotpoint_sdk}" }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment