[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:
Watson
2014-06-07 09:30:21 +09:00
parent 493a06f1d7
commit 9bfb8f4ef7
2 changed files with 4 additions and 3 deletions

View File

@@ -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

View File

@@ -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