SlideShare a Scribd company logo
1 of 37
Download to read offline
an
              Taiw
           nf
     C   o
   by
Ru



                   RubyMotion
                       HACK YOUR IOS APP LIKE NEVER BEFORE
Who Am I?
古傑芳
@josephku
WHAT’S
                     RUBYMOTION?

A Ruby toolchain for iOS
Develop and test native iOS app in Ruby
Based on MacRuby
Laurent Sansonetti (@lrz)
Why RubyMotion?
iOS SDK



Foundation Framework

Objective-C Runtime



    Objective-C
iOS SDK



    Foundation Framework

     Objective-C Runtime



RubyMotion             Objective-C
WHY RUBYMOTION?


100% native code
Keep your editor
App Store compliant
Babe, Let’s Rock!!
Dirty
Dirty
The Last Mile
DEPLOYMENT


Deploy your app to beta testers by TestFlight
$ gem install motion-testflight

$ rake testflight notes='Orz'

Deploy to App Store
$ rake archive:distribution
Objective-C
// Foo.h
@interface Foo: NSObject
{
}
@property (nonatomic, strong) NSString *bar;
@end

// Foo.m
#import “Foo.h”
@implementation Foo
@synthesize bar = _bar;
@end


                     RubyMotion
                  class Foo
                    attr_accessor :bar
                  end
WTF!!
outputImageProviderFromBufferWithPixelFormat:pixelsWide:pixelsHigh:ba
seAddress:bytesPerRow:releaseCallback:releaseContext:colorSpace:shoul
                            dColorMatch:
Objective-C
NSDictionary *rules = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber NumberWithBool:TRUE],"RubyIsAwesome",nil];




                                             RubyMotion
                                rules = { RubyIsAwesome: 1 }




        What’s the magic??
Babe, Rock Again!!
LIMITATIONS

require
eval
define_method
Proc#binding
Regular gems don’t work
PROS & CONS


One-time fee of $199
Growing faster and faster
Apple’s attitude
Is RubyMotion the future?
DSL
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
RubyMine
IS THE RUBYMOTION
                  THE FUTURE?

DSL
Well-known editor and IDE Support
Active community
C’mon, it’s Ruby!!
Any questions?
Thank you!

More Related Content

Similar to RubyMotion: Hack Your iOS App Like Never Before

MacRuby & RubyMotion - Madridrb May 2012
MacRuby & RubyMotion - Madridrb May 2012MacRuby & RubyMotion - Madridrb May 2012
MacRuby & RubyMotion - Madridrb May 2012
Mark Villacampa
 
MacRuby & HotCocoa
MacRuby & HotCocoaMacRuby & HotCocoa
MacRuby & HotCocoa
Thilo Utke
 
Rubymotion inspect 2014_review
Rubymotion inspect 2014_reviewRubymotion inspect 2014_review
Rubymotion inspect 2014_review
Bob Firestone
 
Macruby& Hotcocoa presentation by Rich Kilmer
Macruby& Hotcocoa presentation by Rich KilmerMacruby& Hotcocoa presentation by Rich Kilmer
Macruby& Hotcocoa presentation by Rich Kilmer
Matt Aimonetti
 
Ruby'izing iOS development
Ruby'izing iOS developmentRuby'izing iOS development
Ruby'izing iOS development
toamitkumar
 

Similar to RubyMotion: Hack Your iOS App Like Never Before (20)

RubyMotion Introduction
RubyMotion IntroductionRubyMotion Introduction
RubyMotion Introduction
 
MacRuby & RubyMotion - Madridrb May 2012
MacRuby & RubyMotion - Madridrb May 2012MacRuby & RubyMotion - Madridrb May 2012
MacRuby & RubyMotion - Madridrb May 2012
 
RubyMotion Introduction
RubyMotion IntroductionRubyMotion Introduction
RubyMotion Introduction
 
RubyMotion #jbday
RubyMotion #jbdayRubyMotion #jbday
RubyMotion #jbday
 
Using Ruby in Android Development
Using Ruby in Android DevelopmentUsing Ruby in Android Development
Using Ruby in Android Development
 
ruby-cocoa
ruby-cocoaruby-cocoa
ruby-cocoa
 
ruby-cocoa
ruby-cocoaruby-cocoa
ruby-cocoa
 
Mobile Development integration tests
Mobile Development integration testsMobile Development integration tests
Mobile Development integration tests
 
Mac ruby to the max - Brendan G. Lim
Mac ruby to the max - Brendan G. LimMac ruby to the max - Brendan G. Lim
Mac ruby to the max - Brendan G. Lim
 
MacRuby to The Max
MacRuby to The MaxMacRuby to The Max
MacRuby to The Max
 
MacRuby & HotCocoa
MacRuby & HotCocoaMacRuby & HotCocoa
MacRuby & HotCocoa
 
Cordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirstCordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirst
 
Rubymotion inspect 2014_review
Rubymotion inspect 2014_reviewRubymotion inspect 2014_review
Rubymotion inspect 2014_review
 
Macruby& Hotcocoa presentation by Rich Kilmer
Macruby& Hotcocoa presentation by Rich KilmerMacruby& Hotcocoa presentation by Rich Kilmer
Macruby& Hotcocoa presentation by Rich Kilmer
 
RubyMotion - Meetup Ruby lx
RubyMotion - Meetup Ruby lxRubyMotion - Meetup Ruby lx
RubyMotion - Meetup Ruby lx
 
RubyMotion
RubyMotionRubyMotion
RubyMotion
 
Introduction to Cordova
Introduction to CordovaIntroduction to Cordova
Introduction to Cordova
 
Ruby'izing iOS development
Ruby'izing iOS developmentRuby'izing iOS development
Ruby'izing iOS development
 
Bringing the Ruby language into the mobile world
Bringing the Ruby language into the mobile worldBringing the Ruby language into the mobile world
Bringing the Ruby language into the mobile world
 
Ruby on Rails - An overview
Ruby on Rails -  An overviewRuby on Rails -  An overview
Ruby on Rails - An overview
 

Recently uploaded

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Recently uploaded (20)

The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 

RubyMotion: Hack Your iOS App Like Never Before