From 1567487ac96802e321705478489c19e15387050a Mon Sep 17 00:00:00 2001 From: Laurent Sansonetti Date: Sat, 11 Oct 2014 15:52:28 +0200 Subject: [PATCH] when attaching the debugger to the device, make sure to pass the appropriate arch to the debug server and lldb (which could be arm64) --- lib/motion/project/template/ios.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/motion/project/template/ios.rb b/lib/motion/project/template/ios.rb index 23b6e5ca..6f4dba4d 100644 --- a/lib/motion/project/template/ios.rb +++ b/lib/motion/project/template/ios.rb @@ -231,6 +231,17 @@ 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}\"" + if ENV['debug'] + unless remote_arch = ENV['arch'] + ary = App.config.archs['iPhoneOS'] + remote_arch = ary.last + if ary.size > 1 + $stderr.puts "*** Application is built for multiple architectures (#{ary.join(', ')}), the debugger will target #{remote_arch}. Pass the `arch' option in order to specify which one to use (ex. rake device debug=1 arch=arm64)." + end + end + env << " RM_REMOTE_ARCH=\"#{remote_arch}\"" + end + deploy = File.join(App.config.bindir, 'ios/deploy') flags = Rake.application.options.trace ? '-d' : '' Signal.trap(:INT) { } if ENV['debug']