RubyMotion: Hack Your iOS App Like Never Before

7f403c925a51bf816b8c31c77c6f678b?s=47 Joseph Ku
December 08, 2012

RubyMotion: Hack Your iOS App Like Never Before

* Talk @ RubyConf Taiwan 2012 (2012.12.08)

7f403c925a51bf816b8c31c77c6f678b?s=128

Joseph Ku

December 08, 2012
Tweet

Transcript

  1. RubyConf Taiwan RubyMotion HACK YOUR IOS APP LIKE NEVER BEFORE

  2. Who Am I?

  3. ຑพ፡

  4. !KPTFQILV

  5. None
  6. WHAT’S RUBYMOTION? A Ruby toolchain for iOS Develop and test

    native iOS app in Ruby Based on MacRuby Laurent Sansonetti (@lrz)
  7. Why RubyMotion?

  8. None
  9. Objective-C Objective-C Runtime iOS SDK Foundation Framework

  10. Objective-C Objective-C Runtime iOS SDK Foundation Framework RubyMotion

  11. None
  12. None
  13. None
  14. WHY RUBYMOTION? 100% native code Keep your editor App Store

    compliant
  15. Babe, Let’s Rock!!

  16. Dirty

  17. Dirty

  18. The Last Mile

  19. DEPLOYMENT Deploy your app to beta testers by TestFlight Deploy

    to App Store $ rake archive:distribution $ gem install motion-testflight $ rake testflight notes='Orz'
  20. // Foo.h @interface Foo: NSObject { } @property (nonatomic, strong)

    NSString *bar; @end // Foo.m #import “Foo.h” @implementation Foo @synthesize bar = _bar; @end class Foo attr_accessor :bar end Objective-C RubyMotion
  21. outputImageProviderFromBufferWithPixelFormat:pixelsWide:pixelsHigh:ba seAddress:bytesPerRow:releaseCallback:releaseContext:colorSpace:shoul dColorMatch: WTF!!

  22. NSDictionary *rules = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber NumberWithBool:TRUE],"RubyIsAwesome",nil]; Objective-C RubyMotion rules =

    { RubyIsAwesome: 1 } What’s the magic??
  23. Babe, Rock Again!!

  24. LIMITATIONS require eval define_method Proc#binding Regular gems don’t work

  25. PROS & CONS One-time fee of $199 Growing faster and

    faster Apple’s attitude
  26. Is RubyMotion the future?

  27. %4-

  28. App.alert("BubbleWrap is awesome!") App.run_after(0.5) { p "It's #{Time.now}" } App.open_url("http://rubyconf.tw/2012/")

    Device.iphone? Device.ipad? Device.front_camera? BW::Media.play_modal("http://www.hrupin.com/wp-content/ uploads/mp3/testsong_20_sec.mp3") EM.add_timer 1.0 do puts "Great scott!" end
  29. None
  30. None
  31. 3VCZ.JOF

  32. None
  33. None
  34. IS THE RUBYMOTION THE FUTURE? DSL Well-known editor and IDE

    Support Active community
  35. C’mon, it’s Ruby!!

  36. Any questions?

  37. 5IBOLZPV