SlideShare ist ein Scribd-Unternehmen logo
1 von 47
Downloaden Sie, um offline zu lesen
RubyConf Taiw
an
RubyMotion Gets A
Cool New Friend
mruby on iOS
Who Am I?
古傑芳
@josephku
!WHAT’S
RUBYMOTION?
A Ruby toolchain for iOS
Develop and test native iOS app in Ruby
Based on MacRuby
Objective-C
Objective-C Runtime
iOS SDK
Foundation Framework
Objective-C
Objective-C Runtime
iOS SDK
Foundation Framework
RubyMotion
!
WHY RUBYMOTION?
100% native code
Keep your editor
App Store compliant
!
DEPLOYMENT
Deploy your app to beta testers by TestFlight
!
!
Deploy to App Store
$ rake archive:distribution
$ gem install motion-testflight
$ rake testflight notes='Orz'
!UPDATES FOR
RUBYMOTION
Xcode 5.1 & iOS 7.1 support
OS X support
Templates
Fix tons of memory management issues
Background fetching
Performance improvements
WWDC 2013 June 10-14
Super aggressive team!
Babe, Let’s Rock!!
class Test	
def test	
foo = 42	
Proc.new { foo + 123 }	
end	
end	
!
Test.new.test.call # Crashes sometimes
mruby
1.0.0
How about mruby on
Apple’s 64-bit A7 SoC?
app.archs['iPhoneOS'] << 'arm64'
RubyMotion - Rakefile
MRuby::CrossBuild.new('ios-arm64') do |conf|	
toolchain :gcc	
!
conf.cc.flags << "-arch arm64"	
conf.linker.flags << "-arch arm64”	
	
# ... 	
!
end
mruby - build_config.rb
#define MRB_INT64
#define MRB_USE_FLOAT
#define MRB_USE_FLOAT; #define MRB_INT64
0%
1%
2%
3%
4%
5%
6%
bm_so_lists.rb fib39.rb
Benchmark on A7
64-bit RiteVM
!WHY MRUBY &
RUBYMOTION?
Focusing
Avoiding limitations
DSL
mruby + RubyMotion = ?
Where to use?
Explain things better
{	
"uuid": "B9407F30-F5F8-466E-AFF9-25556B57FE6D",	
"events": [	
{	
"proximity": "immediate",	
"url": "http://host.com/event/1"	
},	
{	
"proximity": "near",	
"url": "http://host.com/event/2"	
},	
{	
"proximity": "far",	
"url": "http://host.com/event/3"	
}	
]	
}
beacon b1 do	
uuid "B9407F30-F5F8-466E-AFF9-25556B57FE6D"	
major 75682	
minor 1	
end	
!
beacon b2 do	
uuid "B9407F30-F5F8-466E-AFF9-25556B57FE6D"	
major 75682	
minor 2	
end	
!
beacon b3 do	
uuid "B9407F30-F5F8-466E-AFF9-25556B57FE6D"	
major 75682	
minor 3	
end	
!
event b1.far, b2.near do	
url “https://host.com/event/1"	
end	
!
event b2.immediate, !b3.far do	
url “https://host.com/event/2"	
end
Game scripting in mruby
Lua! Ruby!
Babe, Let’s Rock!!
Hide your code
#include <stdint.h>	
const uint8_t nothing_here[] = {	
0x52,0x49,0x54,0x45,0x30,0x30,0x30,0x32,0x1f,0xef,0x00,0x00,0x00,0x62,0x4d,0x41,	
0x54,0x5a,0x30,0x30,0x30,0x30,0x49,0x52,0x45,0x50,0x00,0x00,0x00,0x44,0x30,0x30,	
0x30,0x30,0x00,0x00,0x00,0x38,0x00,0x01,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x04,	
0x00,0x80,0x00,0x06,0x01,0x00,0x00,0x3d,0x00,0x80,0x00,0xa0,0x00,0x00,0x00,0x4a,	
0x00,0x00,0x00,0x01,0x00,0x00,0x08,0x74,0x6f,0x6c,0x64,0x20,0x79,0x6f,0x75,0x00,	
0x00,0x00,0x01,0x00,0x04,0x70,0x75,0x74,0x73,0x00,0x45,0x4e,0x44,0x00,0x00,0x00,	
0x00,0x08,	
};
secret.c
$ mrbc -Bnothing_here secret.rb
mrb.read_irep nothing_here	
mrb.run
Ruby Everywhere!!
Any questions?
Thank you!

Weitere ähnliche Inhalte

Andere mochten auch

Swift Introduction to Swift in Ruby
Swift Introduction to Swift in RubySwift Introduction to Swift in Ruby
Swift Introduction to Swift in RubyJoseph Ku
 
Ruby on Google App Engine: Upgrade to Google App "Turbo" Engine
Ruby on Google App Engine: Upgrade to Google App "Turbo" EngineRuby on Google App Engine: Upgrade to Google App "Turbo" Engine
Ruby on Google App Engine: Upgrade to Google App "Turbo" EngineJoseph Ku
 
手機遊戲開發的兩三事
手機遊戲開發的兩三事手機遊戲開發的兩三事
手機遊戲開發的兩三事Joseph Ku
 
Hanami in Production @ Hanami User Group SP
Hanami in Production @ Hanami User Group SPHanami in Production @ Hanami User Group SP
Hanami in Production @ Hanami User Group SPHélio Costa E Silva
 
Hanami Festival - Japan
Hanami Festival - JapanHanami Festival - Japan
Hanami Festival - JapanRecklessLee
 

Andere mochten auch (6)

Swift Introduction to Swift in Ruby
Swift Introduction to Swift in RubySwift Introduction to Swift in Ruby
Swift Introduction to Swift in Ruby
 
Ruby on Google App Engine: Upgrade to Google App "Turbo" Engine
Ruby on Google App Engine: Upgrade to Google App "Turbo" EngineRuby on Google App Engine: Upgrade to Google App "Turbo" Engine
Ruby on Google App Engine: Upgrade to Google App "Turbo" Engine
 
手機遊戲開發的兩三事
手機遊戲開發的兩三事手機遊戲開發的兩三事
手機遊戲開發的兩三事
 
Mrubyまとめ v01
Mrubyまとめ v01Mrubyまとめ v01
Mrubyまとめ v01
 
Hanami in Production @ Hanami User Group SP
Hanami in Production @ Hanami User Group SPHanami in Production @ Hanami User Group SP
Hanami in Production @ Hanami User Group SP
 
Hanami Festival - Japan
Hanami Festival - JapanHanami Festival - Japan
Hanami Festival - Japan
 

Ähnlich wie RubyMotion Gets A Cool New Friend: mruby on iOS

Bitter Java, Sweeten with JRuby
Bitter Java, Sweeten with JRubyBitter Java, Sweeten with JRuby
Bitter Java, Sweeten with JRubyBrian Sam-Bodden
 
RubyMotion Introduction
RubyMotion IntroductionRubyMotion Introduction
RubyMotion IntroductionLori Olson
 
RubyMotion - Meetup Ruby lx
RubyMotion - Meetup Ruby lxRubyMotion - Meetup Ruby lx
RubyMotion - Meetup Ruby lxrmscms
 
Rubymotion inspect 2014_review
Rubymotion inspect 2014_reviewRubymotion inspect 2014_review
Rubymotion inspect 2014_reviewBob Firestone
 
Write cross platform native apps in Ruby
Write cross platform native apps in RubyWrite cross platform native apps in Ruby
Write cross platform native apps in RubyGiedrius Rimkus
 
MacRuby & RubyMotion - Madridrb May 2012
MacRuby & RubyMotion - Madridrb May 2012MacRuby & RubyMotion - Madridrb May 2012
MacRuby & RubyMotion - Madridrb May 2012Mark Villacampa
 
RubyMotion Inspect Conference - 2013. (Without speaker notes.)
RubyMotion Inspect Conference - 2013. (Without speaker notes.)RubyMotion Inspect Conference - 2013. (Without speaker notes.)
RubyMotion Inspect Conference - 2013. (Without speaker notes.)alloy020
 
Ruby'izing iOS development
Ruby'izing iOS developmentRuby'izing iOS development
Ruby'izing iOS developmenttoamitkumar
 
Mac ruby deployment
Mac ruby deploymentMac ruby deployment
Mac ruby deploymentThilo Utke
 
MacRuby & HotCocoa
MacRuby & HotCocoaMacRuby & HotCocoa
MacRuby & HotCocoaThilo Utke
 
[Srijan Wednesday Webinars] Building Full-Fledged Native Apps Using RubyMotion
[Srijan Wednesday Webinars] Building Full-Fledged Native Apps Using RubyMotion[Srijan Wednesday Webinars] Building Full-Fledged Native Apps Using RubyMotion
[Srijan Wednesday Webinars] Building Full-Fledged Native Apps Using RubyMotionSrijan Technologies
 
Cordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirstCordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirstRaymond Camden
 
Uri Nachmias - Adopting Swift @Houzz - The good, the bad and the ugly
Uri Nachmias - Adopting Swift @Houzz - The good, the bad and the uglyUri Nachmias - Adopting Swift @Houzz - The good, the bad and the ugly
Uri Nachmias - Adopting Swift @Houzz - The good, the bad and the uglytlv-ios-dev
 
MacRuby For Ruby Developers
MacRuby For Ruby DevelopersMacRuby For Ruby Developers
MacRuby For Ruby DevelopersRenzo Borgatti
 
Improving your workflow with RubyMotion
Improving your workflow with RubyMotionImproving your workflow with RubyMotion
Improving your workflow with RubyMotionMark Villacampa
 
Introduction to Cordova
Introduction to CordovaIntroduction to Cordova
Introduction to CordovaRaymond Camden
 
Rails On Spring
Rails On SpringRails On Spring
Rails On Springswamy g
 
Making Swift Native Modules in React Native
Making Swift Native Modules in React NativeMaking Swift Native Modules in React Native
Making Swift Native Modules in React NativeRay Deck
 

Ähnlich wie RubyMotion Gets A Cool New Friend: mruby on iOS (20)

Bitter Java, Sweeten with JRuby
Bitter Java, Sweeten with JRubyBitter Java, Sweeten with JRuby
Bitter Java, Sweeten with JRuby
 
RubyMotion Introduction
RubyMotion IntroductionRubyMotion Introduction
RubyMotion Introduction
 
RubyMotion - Meetup Ruby lx
RubyMotion - Meetup Ruby lxRubyMotion - Meetup Ruby lx
RubyMotion - Meetup Ruby lx
 
Rubymotion inspect 2014_review
Rubymotion inspect 2014_reviewRubymotion inspect 2014_review
Rubymotion inspect 2014_review
 
Write cross platform native apps in Ruby
Write cross platform native apps in RubyWrite cross platform native apps in Ruby
Write cross platform native apps in Ruby
 
MacRuby & RubyMotion - Madridrb May 2012
MacRuby & RubyMotion - Madridrb May 2012MacRuby & RubyMotion - Madridrb May 2012
MacRuby & RubyMotion - Madridrb May 2012
 
RubyMotion Inspect Conference - 2013. (Without speaker notes.)
RubyMotion Inspect Conference - 2013. (Without speaker notes.)RubyMotion Inspect Conference - 2013. (Without speaker notes.)
RubyMotion Inspect Conference - 2013. (Without speaker notes.)
 
Ruby'izing iOS development
Ruby'izing iOS developmentRuby'izing iOS development
Ruby'izing iOS development
 
Mac ruby deployment
Mac ruby deploymentMac ruby deployment
Mac ruby deployment
 
MacRuby & HotCocoa
MacRuby & HotCocoaMacRuby & HotCocoa
MacRuby & HotCocoa
 
[Srijan Wednesday Webinars] Building Full-Fledged Native Apps Using RubyMotion
[Srijan Wednesday Webinars] Building Full-Fledged Native Apps Using RubyMotion[Srijan Wednesday Webinars] Building Full-Fledged Native Apps Using RubyMotion
[Srijan Wednesday Webinars] Building Full-Fledged Native Apps Using RubyMotion
 
Cordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirstCordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirst
 
Uri Nachmias - Adopting Swift @Houzz - The good, the bad and the ugly
Uri Nachmias - Adopting Swift @Houzz - The good, the bad and the uglyUri Nachmias - Adopting Swift @Houzz - The good, the bad and the ugly
Uri Nachmias - Adopting Swift @Houzz - The good, the bad and the ugly
 
MacRuby For Ruby Developers
MacRuby For Ruby DevelopersMacRuby For Ruby Developers
MacRuby For Ruby Developers
 
Improving your workflow with RubyMotion
Improving your workflow with RubyMotionImproving your workflow with RubyMotion
Improving your workflow with RubyMotion
 
Introduction to Cordova
Introduction to CordovaIntroduction to Cordova
Introduction to Cordova
 
Rails On Spring
Rails On SpringRails On Spring
Rails On Spring
 
Making Swift Native Modules in React Native
Making Swift Native Modules in React NativeMaking Swift Native Modules in React Native
Making Swift Native Modules in React Native
 
ruby-cocoa
ruby-cocoaruby-cocoa
ruby-cocoa
 
ruby-cocoa
ruby-cocoaruby-cocoa
ruby-cocoa
 

Kürzlich hochgeladen

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 

Kürzlich hochgeladen (20)

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

RubyMotion Gets A Cool New Friend: mruby on iOS