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
1k
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
50
Microservices
linjunpop
0
53
Actor Model
linjunpop
0
24
A brief introduction to GitHub
linjunpop
1
65
Test Driven Development
linjunpop
0
43
Ruby 2.0
linjunpop
1
170
Other Decks in Programming
See All in Programming
『GO』アプリ バックエンドサーバのコスト削減
mot_techtalk
0
130
Lottieアニメーションをカスタマイズしてみた
tahia910
0
120
ASP. NET CoreにおけるWebAPIの最新情報
tomokusaba
0
360
2,500万ユーザーを支えるSREチームの6年間のスクラムのカイゼン
honmarkhunt
6
5.1k
最近のVS Codeで気になるニュース 2025/01
74th
1
250
昭和の職場からアジャイルの世界へ
kumagoro95
1
350
テストをしないQAエンジニアは何をしているか?
nealle
0
130
JavaScriptツール群「UnJS」を5分で一気に駆け巡る!
k1tikurisu
10
1.8k
Kanzawa.rbのLT大会を支える技術の裏側を変更する Ruby on Rails + Litestream 編
muryoimpl
0
220
Pulsar2 を雰囲気で使ってみよう
anoken
0
230
Introduction to kotlinx.rpc
arawn
0
630
iOSエンジニアから始める visionOS アプリ開発
nao_randd
3
120
Featured
See All Featured
KATA
mclloyd
29
14k
Into the Great Unknown - MozCon
thekraken
35
1.6k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Building Applications with DynamoDB
mza
93
6.2k
How GitHub (no longer) Works
holman
313
140k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
114
50k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
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