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
Ruby for iOS developer
Search
Jun Lin
March 14, 2014
Programming
0
990
Ruby for iOS developer
A brief introduction to Ruby for iOS developer. S01 E01
Jun Lin
March 14, 2014
Tweet
Share
More Decks by Jun Lin
See All by Jun Lin
A brief introduction to GenStage
linjunpop
1
48
Microservices
linjunpop
0
53
Actor Model
linjunpop
0
24
A brief introduction to GitHub
linjunpop
1
64
Test Driven Development
linjunpop
0
41
Ruby 2.0
linjunpop
1
170
Other Decks in Programming
See All in Programming
Remix on Hono on Cloudflare Workers
yusukebe
1
310
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
1k
[Do iOS '24] Ship your app on a Friday...and enjoy your weekend!
polpielladev
0
110
CSC509 Lecture 11
javiergs
PRO
0
180
React への依存を最小にするフロントエンド設計
takonda
12
3.5k
Ethereum_.pdf
nekomatu
0
470
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.8k
Jakarta EE meets AI
ivargrimstad
0
290
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
910
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
334
57k
Automating Front-end Workflow
addyosmani
1366
200k
Rails Girls Zürich Keynote
gr2m
94
13k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
Building Applications with DynamoDB
mza
90
6.1k
For a Future-Friendly Web
brad_frost
175
9.4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Being A Developer After 40
akosma
87
590k
What's in a price? How to price your products and services
michaelherold
243
12k
Agile that works and the tools we love
rasmusluckow
327
21k
Raft: Consensus for Rubyists
vanstee
136
6.6k
Transcript
Ruby For iOS developer S01 E01
Concept • Ruby • Version manager(s) • Ruby versions •
Gem • Bundler • CocoaPods
Ruby
A programming language
$ ruby
System Ruby /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Why not use system ruby • Gem dependencies hell •
Outdated
$ sudo gem install NEVER
Version manager(s)
• (RVM) http://rvm.io • (rbenv) https://github.com/sstephenson/rbenv • (chruby) https://github.com/postmodern/chruby
RVM Powerful. It can install, manager ruby versions $ \curl
-sSL https://get.rvm.io | bash -s stable
rbenv Lightweight, but shims is a little painful $ brew
install rbenv ruby-build
chruby Lightweight as rbenv, no shims RECOMMENDED $ brew install
chruby ruby-install
Ruby versions
CRuby, MRI
• ruby-1.8 • ruby-1.9.3-p448 • ruby-2.0.0-p247 • ruby-2.0.0-p353 • ruby-2.1.0
• ruby-2.1.1
1.8 is DEAD
1.9 ~ 2.0
A patch breaks API too • ruby-1.9.3-p327 • ruby-1.9.3-p448
Since 2.1.0
Semantic Versioning https://www.ruby-lang.org/en/news/2013/12/21/semantic-versioning-after-2-1-0/ Finally
.ruby-version
• 2.0.0 • 2.0.0-p353 • 2.1.0 • 2.1.1
Gem
Ships with Ruby, manage gems
rubygems.org
None
Bundler
None
$ gem install bundler
Gemfile source 'https://rubygems.org' gem ‘nokogiri' gem 'rails', github: 'rails/rails' group
:test do gem 'rspec', require: ‘spec' end
$ bundle install
CocoaPods
A Ruby gem $ gem install cocoapods
Podfile similar to Gemfile
Podfile platform :ios, '6.0' ! xcodeproj `MyProject` ! pod 'ObjectiveSugar',
'~> 0.5’ ! target :test do pod 'OCMock', '~> 2.0.1' end
Q&A
Thanks