mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-29 13:15:37 +08:00
fix a bug which iOS simulator will be re-launched at every time with `rake'
RM-52 Should not re-launch iOS simulator at every time with `rake'
This commit is contained in:
@@ -85,7 +85,8 @@ task :simulator => ['build:simulator'] do
|
||||
|
||||
# Configure the SimulateDevice variable (the only way to specify if we want to run in retina mode or not).
|
||||
simulate_device = App.config.device_family_string(family_int, target, retina)
|
||||
if `/usr/bin/defaults read com.apple.iphonesimulator "SimulateDevice"`.strip != simulate_device
|
||||
default_simulator = `/usr/bin/defaults read com.apple.iphonesimulator "SimulateDevice"`.strip
|
||||
if default_simulator != simulate_device && default_simulator != "'#{simulate_device}'"
|
||||
system("/usr/bin/killall \"iPhone Simulator\" >& /dev/null")
|
||||
system("/usr/bin/defaults write com.apple.iphonesimulator \"SimulateDevice\" \"'#{simulate_device}'\"")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user