mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-01 17:39:54 +08:00
[iOS8] add "device_name" parameter
Usage: $ rake device_name="iPad Air" We can use the following device name for iOS 8 simulator. "iPhone 4s" "iPhone 5" "iPhone 5s" "iPad 2" "iPad Retina" "iPad Air" "Resizable iPhone" "Resizable iPad"
This commit is contained in:
@@ -149,7 +149,8 @@ END
|
||||
end
|
||||
end
|
||||
|
||||
simulate_device = App.config.device_family_string(family_int, target, retina)
|
||||
device_name = ENV["device_name"]
|
||||
simulate_device = App.config.device_family_string(device_name, family_int, target, retina)
|
||||
|
||||
# Launch the simulator.
|
||||
xcode = App.config.xcode_dir
|
||||
|
||||
@@ -200,7 +200,7 @@ module Motion; module Project;
|
||||
end
|
||||
end
|
||||
|
||||
def device_family_string(family, target, retina)
|
||||
def device_family_string(device_name, family, target, retina)
|
||||
device = case family
|
||||
when :iphone, 1
|
||||
"iPhone"
|
||||
@@ -211,7 +211,7 @@ module Motion; module Project;
|
||||
ver = xcode_version[0].match(/(\d+)/)
|
||||
case ver[0].to_i
|
||||
when 6
|
||||
device + device_retina_xcode6_string(family, target, retina)
|
||||
(device_name.nil?) ? device + device_retina_xcode6_string(family, target, retina) : device_name
|
||||
when 5
|
||||
device + device_retina_xcode5_string(family, target, retina)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user