diff --git a/NEWS b/NEWS index 8a7bf9c4..d52b3b35 100644 --- a/NEWS +++ b/NEWS @@ -21,7 +21,7 @@ * Fixed a bug where it would hold an object if it would call the #initXXX in the #initialize of a class inherited Objective-C class. * Added a feature which passing the arguments on launching app. - (Ex app.sim_args = "-com.apple.CoreData.SQLDebug 1") + (Ex app.sim_args += ["-com.apple.CoreData.SQLDebug", "1"]) * Fixed a bug in #respond_to? where WeakRef objects would not be properly handled. * [OSX] Fixed a bug in `rake debug=1' where the debugger would not properly diff --git a/lib/motion/project/template/ios.rb b/lib/motion/project/template/ios.rb index 20545828..28d31a0f 100644 --- a/lib/motion/project/template/ios.rb +++ b/lib/motion/project/template/ios.rb @@ -88,10 +88,10 @@ task :simulator => ['build:simulator'] do env << ' SIM_SPEC_MODE=1' if App.config.spec_mode sim = File.join(App.config.bindir, 'ios/sim') debug = (ENV['debug'] ? 1 : (App.config.spec_mode ? '0' : '2')) - app_args = App.config.sim_args.map { |x| '"' + x + '"' } + app_args = App.config.sim_args.map { |x| '"' + x + '"' }.join(" ") App.info 'Simulate', app at_exit { system("stty echo") } if $stdout.tty? # Just in case the simulator launcher crashes and leaves the terminal without echo. - sh "#{env} #{sim} #{debug} #{family_int} #{target} \"#{xcode}\" \"#{app}\" \"#{app_args}\"" + sh "#{env} #{sim} #{debug} #{family_int} #{target} \"#{xcode}\" \"#{app}\" #{app_args}" end desc "Create an .ipa archive" diff --git a/lib/motion/project/template/osx.rb b/lib/motion/project/template/osx.rb index 0bde2c25..67f8eeff 100644 --- a/lib/motion/project/template/osx.rb +++ b/lib/motion/project/template/osx.rb @@ -57,10 +57,10 @@ task :run => 'build:development' do sim = File.join(App.config.bindir, 'osx/sim') debug = (ENV['debug'] ? 1 : (App.config.spec_mode ? '0' : '2')) target = App.config.sdk_version - app_args = App.config.sim_args.map { |x| '"' + x + '"' } + app_args = App.config.sim_args.map { |x| '"' + x + '"' }.join(" ") App.info 'Run', exec at_exit { system("stty echo") } if $stdout.tty? # Just in case the process crashes and leaves the terminal without echo. - sh "#{env} #{sim} #{debug} #{target} \"#{exec}\" \"#{app_args}\"" + sh "#{env} #{sim} #{debug} #{target} \"#{exec}\" #{app_args}" end desc "Run the test/spec suite"