Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Use RubyMotion
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Brent Hargrave
April 10, 2013
Programming
68
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Use RubyMotion
Brent Hargrave
April 10, 2013
Other Decks in Programming
See All in Programming
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
220
Android CLI
fornewid
0
230
5分で問診!Composer セキュリティ健康診断
codmoninc
0
1.1k
琵琶湖の水は止められてもNet--HTTPのリトライは止められない / You might be able to stop the water flow of Lake Biwa but you can't stop Net::HTTP retries
luccafort
PRO
0
810
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
0
1.9k
170k Jobs a Day on GKE: Scaling Mercari's CI Platform - and What's Next for AI-Native Development
junyaokabe
0
110
PHP初心者セッション2026 〜生成AIでは見えない裏側を知る:今だからLAMPを通して仕組みを学ぶ〜
kashioka
0
980
プロポーザルを書いてもらう
pvcresin
0
560
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
230
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
150
AWS DevOps AgentのAzure接続機能を検証して見えた活用法/Use Cases Verified for the AWS DevOps Agent's Azure Connectivity Feature
masakiokuda
1
250
メールのエイリアス機能を履き違えない
isshinfunada
0
250
Featured
See All Featured
Leo the Paperboy
mayatellez
8
2.2k
BBQ
matthewcrist
89
10k
Code Review Best Practice
trishagee
74
20k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
210
Optimizing for Happiness
mojombo
378
71k
Marketing to machines
jonoalderson
1
5.7k
For a Future-Friendly Web
brad_frost
183
10k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Statistics for Hackers
jakevdp
799
230k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
420
Transcript
Use RubyMotion Brent Hargrave @brenthargrave Lower Manhattan iOS Meetup April
10, 2013 Tuesday, May 21, 13
What is RubyMotion? Tuesday, May 21, 13
What is RubyMotion? Terminal-based toolchain for writing native iOS apps
in Ruby Tuesday, May 21, 13
Awesome... so what? Tuesday, May 21, 13
Awesome... so what? Write apps faster, with fewer bugs, than
in Xcode / Obj-C Tuesday, May 21, 13
How? Tuesday, May 21, 13
How? •Language: more expressive Tuesday, May 21, 13
How? •Language: more expressive •Configuration: not in Xcode Tuesday, May
21, 13
How? •Language: more expressive •Configuration: not in Xcode •Editor: is
not Xcode Tuesday, May 21, 13
How? •Language: more expressive •Configuration: not in Xcode •Editor: is
not Xcode •Testing: baked-in Tuesday, May 21, 13
Ruby •No header files! •No #import statements! •Terse syntax Tuesday,
May 21, 13
AFNetworking NSURLRequest *request = [NSURLRequest requestWithURL:url]; AFJSONRequestOperation *operation = [AFJSONRequestOperation
JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) { // handle success } failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id JSON) { // handle failure }]; [operation start]; in Objective-C Tuesday, May 21, 13
AFNetworking request = NSURLRequest.requestWithURL url operation = AFJSONRequestOperation.JSONRequestOperationWithRequest request, success:
lambda { |request, response, id| # handle success }, failure: lambda { |request, response, error, id| # handle failure } operation.start straight Ruby port Tuesday, May 21, 13
AFNetworking AFMotion::Operation::JSON.get("request/path") do |result| if result.success? # handle success elsif
result.failure? # handle failure end end “authentic” Ruby port Tuesday, May 21, 13
Ugh, Ruby performance? •RubyMotion’s Ruby != MRI •Compiled, not interpreted
•Ruby => AST => LLVM IR => machine code Tuesday, May 21, 13
Ruby in Objective-C Runtime Tuesday, May 21, 13
Ruby inherits from Obj-C # kinda/sorta what's happening class String
< NSString #... end rb_string = "foo" rb_string.methods.include? "capitalizedString" #=> true Tuesday, May 21, 13
OK, so it’s fast. What about memory? Tuesday, May 21,
13
OK, so it’s fast. What about memory? ARC-like reference counting,
not garbage collected. Tuesday, May 21, 13
Configuration: Rake, not Xcode # -*- 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 = 'sample_app' end Tuesday, May 21, 13
Builds: Rake, not Xcode Tuesday, May 21, 13
Editor: [anything], not Xcode •Vim •Emacs •TextMate •Notepad? Tuesday, May
21, 13
Editor: [anything], not Xcode •Eliminates faux vs. *actual* source structure
conflicts Tuesday, May 21, 13
Xcode is dead, long live Xcode! Tuesday, May 21, 13
RubyMotion & Xcode •Xcode artifacts can be used in RM
•Storyboards •CoreData models Tuesday, May 21, 13
RubyMotion & Xcode Motion::Project::App.setup do |app| # ... app.pods do
pod "RestKit" pod "AFNetworking" end end Tuesday, May 21, 13
RubyMotion & Xcode •Obj-C inside RM •RM in Xcode/Obj-C Tuesday,
May 21, 13
But... Tuesday, May 21, 13
Apple.can_ban? RubyMotion #=> true Tuesday, May 21, 13
RubyMotion.profiler.exists? #=> false Tuesday, May 21, 13
RubyMotion.open_source? #=> false Tuesday, May 21, 13
RubyGems •Share RM code using gems •But few existing gems
work! •No “eval” or “require” Tuesday, May 21, 13
Smug Hipsters Tuesday, May 21, 13
Keep an eye on it. Tuesday, May 21, 13
Next great mobile startup? Tuesday, May 21, 13
Next great iOS library? Tuesday, May 21, 13
Questions? Tuesday, May 21, 13
Questions? •@brenthargrave •http://brent.is •github.com/jamescallmebrent Tuesday, May 21, 13