Slide 1

Slide 1 text

RubyConf Taiwan RubyMotion HACK YOUR IOS APP LIKE NEVER BEFORE

Slide 2

Slide 2 text

Who Am I?

Slide 3

Slide 3 text

ຑพ፡

Slide 4

Slide 4 text

!KPTFQILV

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

WHAT’S RUBYMOTION? A Ruby toolchain for iOS Develop and test native iOS app in Ruby Based on MacRuby Laurent Sansonetti (@lrz)

Slide 7

Slide 7 text

Why RubyMotion?

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

Objective-C Objective-C Runtime iOS SDK Foundation Framework

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

WHY RUBYMOTION? 100% native code Keep your editor App Store compliant

Slide 15

Slide 15 text

Babe, Let’s Rock!!

Slide 16

Slide 16 text

Dirty

Slide 17

Slide 17 text

Dirty

Slide 18

Slide 18 text

The Last Mile

Slide 19

Slide 19 text

DEPLOYMENT Deploy your app to beta testers by TestFlight Deploy to App Store $ rake archive:distribution $ gem install motion-testflight $ rake testflight notes='Orz'

Slide 20

Slide 20 text

// 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

Slide 21

Slide 21 text

outputImageProviderFromBufferWithPixelFormat:pixelsWide:pixelsHigh:ba seAddress:bytesPerRow:releaseCallback:releaseContext:colorSpace:shoul dColorMatch: WTF!!

Slide 22

Slide 22 text

NSDictionary *rules = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber NumberWithBool:TRUE],"RubyIsAwesome",nil]; Objective-C RubyMotion rules = { RubyIsAwesome: 1 } What’s the magic??

Slide 23

Slide 23 text

Babe, Rock Again!!

Slide 24

Slide 24 text

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

Slide 25

Slide 25 text

PROS & CONS One-time fee of $199 Growing faster and faster Apple’s attitude

Slide 26

Slide 26 text

Is RubyMotion the future?

Slide 27

Slide 27 text

%4-

Slide 28

Slide 28 text

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

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

3VCZ.JOF

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

IS THE RUBYMOTION THE FUTURE? DSL Well-known editor and IDE Support Active community

Slide 35

Slide 35 text

C’mon, it’s Ruby!!

Slide 36

Slide 36 text

Any questions?

Slide 37

Slide 37 text

5IBOLZPV