diff --git a/lib/motion/project/template/ios.rb b/lib/motion/project/template/ios.rb index 087c4d97..42fba061 100644 --- a/lib/motion/project/template/ios.rb +++ b/lib/motion/project/template/ios.rb @@ -85,7 +85,7 @@ task :simulator => ['build:simulator'] do xcode = App.config.xcode_dir env = "DYLD_FRAMEWORK_PATH=\"#{xcode}/../Frameworks\":\"#{xcode}/../OtherFrameworks\"" env << ' SIM_SPEC_MODE=1' if App.config.spec_mode - sim = File.join(App.config.bindir, 'sim') + sim = File.join(App.config.bindir, 'ios/sim') debug = (ENV['debug'] ? 1 : (App.config.spec_mode ? '0' : '2')) 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. @@ -133,7 +133,7 @@ task :device => :archive do App.fail "Device ID `#{device_id}' not provisioned in profile `#{App.config.provisioning_profile}'" end env = "XCODE_DIR=\"#{App.config.xcode_dir}\"" - deploy = File.join(App.config.bindir, 'deploy') + deploy = File.join(App.config.bindir, 'ios/deploy') flags = Rake.application.options.trace ? '-d' : '' sh "#{env} #{deploy} #{flags} \"#{device_id}\" \"#{App.config.archive}\"" end diff --git a/lib/motion/project/template/ios/config.rb b/lib/motion/project/template/ios/config.rb index 04b4d187..781c20a8 100644 --- a/lib/motion/project/template/ios/config.rb +++ b/lib/motion/project/template/ios/config.rb @@ -133,7 +133,7 @@ module Motion; module Project; def device_id @device_id ||= begin - deploy = File.join(App.config.bindir, 'deploy') + deploy = File.join(App.config.bindir, 'ios/deploy') device_id = `#{deploy} -D`.strip if device_id.empty? App.fail "Can't find an iOS device connected on USB" diff --git a/lib/motion/project/template/osx.rb b/lib/motion/project/template/osx.rb index 11e49458..91a7ec25 100644 --- a/lib/motion/project/template/osx.rb +++ b/lib/motion/project/template/osx.rb @@ -40,11 +40,12 @@ end desc "Run the project" task :run => 'build' do exec = App.config.app_bundle_executable('MacOSX') - if ENV['debug'] - App.info 'Debug', exec - sh "/usr/bin/gdb --args \"#{exec}\"" - else - App.info 'Run', exec - sh "\"#{exec}\"" - end + env = '' + env << 'SIM_SPEC_MODE=1' if App.config.spec_mode + sim = File.join(App.config.bindir, 'osx/sim') + debug = (ENV['debug'] ? 1 : (App.config.spec_mode ? '0' : '2')) + target = App.config.sdk_version + 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}" end