Skip to content

Instantly share code, notes, and snippets.

@falsetto
Created December 15, 2012 22:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save falsetto/4299810 to your computer and use it in GitHub Desktop.
Save falsetto/4299810 to your computer and use it in GitHub Desktop.
class AppDelegate
def application(application, didFinishLaunchingWithOptions:launchOptions)
clientName = "Client"
clientRef = Pointer.new(:uint)
MIDIClientCreate( clientName, nil, nil, clientRef )
portName = "Input"
inport = Pointer.new(:uint)
MIDIInputPortCreate( clientRef[0], portName, inport )
true
end
end
$ rake --trace
** Invoke default (first_time)
** Invoke simulator (first_time)
** Invoke build:simulator (first_time)
** Execute build:simulator
/usr/bin/env VM_KERNEL_PATH="/Library/RubyMotion/data/6.0/iPhoneSimulator/kernel-i386.bc" VM_OPT_LEVEL="0" /Library/RubyMotion/bin/ruby --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/RubyMotion.bridgesupport" --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/UIKit.bridgesupport" --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/CoreVideo.bridgesupport" --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/CoreImage.bridgesupport" --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/Security.bridgesupport" --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/Foundation.bridgesupport" --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/CoreGraphics.bridgesupport" --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/CoreFoundation.bridgesupport" --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/ImageIO.bridgesupport" --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/QuartzCore.bridgesupport" --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/CoreText.bridgesupport" --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/MobileCoreServices.bridgesupport" --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/CFNetwork.bridgesupport" --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/Accelerate.bridgesupport" --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/SystemConfiguration.bridgesupport" --uses-bs "/Library/RubyMotion/data/6.0/BridgeSupport/CoreMIDI.bridgesupport" --emit-llvm "./build/iPhoneSimulator-6.0-Development/objs/usr/local/src/core-midi-test/app/app_delegate.rb.i386.bc" MREP_90FF87E395814EF8AEBE4774286A8014 "/usr/local/src/core-midi-test/app/app_delegate.rb"
/Library/RubyMotion/bin/llc "./build/iPhoneSimulator-6.0-Development/objs/usr/local/src/core-midi-test/app/app_delegate.rb.i386.bc" -o="./build/iPhoneSimulator-6.0-Development/objs/usr/local/src/core-midi-test/app/app_delegate.rb.i386.s" -march=x86 -relocation-model=pic -disable-fp-elim -jit-enable-eh -disable-cfi
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc -fexceptions -c -arch i386 "./build/iPhoneSimulator-6.0-Development/objs/usr/local/src/core-midi-test/app/app_delegate.rb.i386.s" -o "./build/iPhoneSimulator-6.0-Development/objs/usr/local/src/core-midi-test/app/app_delegate.rb.i386.o"
/usr/bin/lipo -create "./build/iPhoneSimulator-6.0-Development/objs/usr/local/src/core-midi-test/app/app_delegate.rb.i386.o" -output "./build/iPhoneSimulator-6.0-Development/objs/usr/local/src/core-midi-test/app/app_delegate.rb.o"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ "./build/iPhoneSimulator-6.0-Development/objs/init.mm" -arch i386 -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk" -miphoneos-version-min=6.0 -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/System/Library/Frameworks -fexceptions -fblocks -fobjc-legacy-dispatch -fobjc-abi-version=2 -c -o "./build/iPhoneSimulator-6.0-Development/objs/init.o"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -o "./build/iPhoneSimulator-6.0-Development/core-midi-test.app/core-midi-test" "./build/iPhoneSimulator-6.0-Development/objs/init.o" "./build/iPhoneSimulator-6.0-Development/objs/main.o" "/Library/RubyMotion/data/6.0/iPhoneSimulator/UIKit_stubs.o" "/Library/RubyMotion/data/6.0/iPhoneSimulator/Foundation_stubs.o" "/Library/RubyMotion/data/6.0/iPhoneSimulator/CoreGraphics_stubs.o" "/Library/RubyMotion/data/6.0/iPhoneSimulator/CoreFoundation_stubs.o" "/Library/RubyMotion/data/6.0/iPhoneSimulator/CFNetwork_stubs.o" "./build/iPhoneSimulator-6.0-Development/objs/usr/local/src/core-midi-test/app/app_delegate.rb.o" -arch i386 -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk" -miphoneos-version-min=6.0 -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/System/Library/Frameworks -L/Library/RubyMotion/data/6.0/iPhoneSimulator -lmacruby-static -lobjc -licucore -framework UIKit -framework CoreVideo -framework CoreImage -framework Security -framework Foundation -framework CoreGraphics -framework CoreFoundation -framework ImageIO -framework QuartzCore -framework CoreText -framework MobileCoreServices -framework CFNetwork -framework Accelerate -framework SystemConfiguration -framework CoreMIDI
/usr/bin/dsymutil "./build/iPhoneSimulator-6.0-Development/core-midi-test.app/core-midi-test" -o "./build/iPhoneSimulator-6.0-Development/core-midi-test.dSYM"
** Execute simulator
DYLD_FRAMEWORK_PATH="/Applications/Xcode.app/Contents/Developer/../Frameworks":"/Applications/Xcode.app/Contents/Developer/../OtherFrameworks" /Library/RubyMotion/bin/sim 2 1 6.0 "/Applications/Xcode.app/Contents/Developer" "./build/iPhoneSimulator-6.0-Development/core-midi-test.app"
(main)> 2012-12-15 14:43:27.410 core-midi-test[42560:c07] app_delegate.rb:5:in `application:didFinishLaunchingWithOptions:': expected instance of Pointer of type `^{OpaqueMIDIClient}', got `I' (TypeError)
2012-12-15 14:43:27.412 core-midi-test[42560:c07] *** Terminating app due to uncaught exception 'TypeError', reason: 'app_delegate.rb:5:in `application:didFinishLaunchingWithOptions:': expected instance of Pointer of type `^{OpaqueMIDIClient}', got `I' (TypeError)'
*** First throw call stack:
(0x1802012 0x176e7e 0xd6244 0x2f92 0x2d45)
libc++abi.dylib: terminate called throwing an exception
*** simulator session ended with error: Error Domain=DTiPhoneSimulatorErrorDomain Code=1 "The simulated application quit." UserInfo=0x100438850 {NSLocalizedDescription=The simulated application quit., DTiPhoneSimulatorUnderlyingErrorCodeKey=-1}
rake aborted!
Command failed with status (1): [DYLD_FRAMEWORK_PATH="/Applications/Xcode.a...]
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/file_utils.rb:53:in `block in create_shell_runner'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/file_utils.rb:45:in `call'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/file_utils.rb:45:in `sh'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/file_utils_ext.rb:40:in `sh'
/Library/RubyMotion/lib/motion/project.rb:101:in `block in <top (required)>'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/task.rb:228:in `call'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/task.rb:228:in `block in execute'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/task.rb:223:in `each'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/task.rb:223:in `execute'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/task.rb:166:in `block in invoke_with_call_chain'
/Users/jedidiah/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/task.rb:159:in `invoke_with_call_chain'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/task.rb:187:in `block in invoke_prerequisites'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/task.rb:185:in `each'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/task.rb:185:in `invoke_prerequisites'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/task.rb:165:in `block in invoke_with_call_chain'
/Users/jedidiah/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/task.rb:159:in `invoke_with_call_chain'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/task.rb:152:in `invoke'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/application.rb:143:in `invoke_task'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/application.rb:101:in `block (2 levels) in top_level'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/application.rb:101:in `each'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/application.rb:101:in `block in top_level'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/application.rb:110:in `run_with_threads'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/application.rb:95:in `top_level'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/application.rb:73:in `block in run'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/application.rb:160:in `standard_exception_handling'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/lib/rake/application.rb:70:in `run'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/gems/rake-0.9.6/bin/rake:37:in `<top (required)>'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/bin/rake:19:in `load'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/bin/rake:19:in `<main>'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
/Users/jedidiah/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => default => simulator
<!-- /Library/RubyMotion/data/6.0/BridgeSupport/CoreMIDI.bridgesupport -->
<function name='MIDIClientCreate'>
<arg name='name' type='^{__CFString=}' declared_type='CFStringRef'/>
<arg name='notifyProc' function_pointer='true' type='^?' declared_type='MIDINotifyProc'>
<arg type='^{MIDINotification=iI}' declared_type='MIDINotification*' const='true'/>
<arg type='^v' declared_type='void*'/>
<retval type='v' declared_type='void'/>
</arg>
<arg name='notifyRefCon' type='^v' declared_type='void*'/>
<arg name='outClient' type='^^{OpaqueMIDIClient}' declared_type='MIDIClientRef*'/>
<retval type='l' declared_type='OSStatus'/>
</function>
# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project'
Motion::Project::App.setup do |app|
# Use `rake config' to see complete project settings.
app.name = 'core-midi-test'
app.frameworks << 'CoreMIDI'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment